mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-26 13:20:55 +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
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,8 @@
|
||||||
|
2000-08-25 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
|
* GMAppKit.m ([NSTextView -encodeWithModelArchiver:]): Test if
|
||||||
|
object responds to allowsUndo.
|
||||||
|
|
||||||
2000-08-25 Fred Kiefer <FredKiefer@gmx.de>
|
2000-08-25 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/Parser/RTFProducer.m
|
* Source/Parser/RTFProducer.m
|
||||||
|
@ -6,6 +11,11 @@
|
||||||
* Source/Parser/rtfScanner.c
|
* Source/Parser/rtfScanner.c
|
||||||
Corrected function gethex().
|
Corrected function gethex().
|
||||||
|
|
||||||
|
2000-08-19 Georg Fleischmann
|
||||||
|
|
||||||
|
* gui/Source/NSView.m ([NSView removeSubview:]): check if any
|
||||||
|
superview of the first responder is the view to be removed
|
||||||
|
|
||||||
2000-08-15 Georg Fleischmann
|
2000-08-15 Georg Fleischmann
|
||||||
|
|
||||||
* gui/Source/NSText.m ([NSText sizeToFit:]): 'else' removed to
|
* gui/Source/NSText.m ([NSText sizeToFit:]): 'else' removed to
|
||||||
|
|
|
@ -397,13 +397,20 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
|
|
||||||
- (void) removeSubview: (NSView*)aSubview
|
- (void) removeSubview: (NSView*)aSubview
|
||||||
{
|
{
|
||||||
|
id view;
|
||||||
/*
|
/*
|
||||||
* This must be first because it invokes -resignFirstResponder:,
|
* This must be first because it invokes -resignFirstResponder:,
|
||||||
* which assumes the view is still in the view hierarchy
|
* 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] )
|
||||||
|
{
|
||||||
|
if (view == aSubview)
|
||||||
{
|
{
|
||||||
[_window makeFirstResponder: _window];
|
[_window makeFirstResponder: _window];
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
aSubview->_super_view = nil;
|
aSubview->_super_view = nil;
|
||||||
[aSubview viewWillMoveToWindow: nil];
|
[aSubview viewWillMoveToWindow: nil];
|
||||||
|
|
Loading…
Reference in a new issue