mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 14:50:38 +00:00
FIx NSTextView model trans. View removal
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7245 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2c13cc926c
commit
b237cbdc26
2 changed files with 19 additions and 2 deletions
|
@ -397,13 +397,20 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
|
||||
- (void) removeSubview: (NSView*)aSubview
|
||||
{
|
||||
id view;
|
||||
/*
|
||||
* This must be first because it invokes -resignFirstResponder:,
|
||||
* which assumes the view is still in the view hierarchy
|
||||
*/
|
||||
if ([_window firstResponder] == aSubview)
|
||||
for (view = [_window firstResponder];
|
||||
view != nil && [view respondsToSelector:@selector(superview)];
|
||||
view = [view superview] )
|
||||
{
|
||||
[_window makeFirstResponder: _window];
|
||||
if (view == aSubview)
|
||||
{
|
||||
[_window makeFirstResponder: _window];
|
||||
break;
|
||||
}
|
||||
}
|
||||
aSubview->_super_view = nil;
|
||||
[aSubview viewWillMoveToWindow: nil];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue