Remove subviews AFTER next/previous key views have been cleaned up, in case any subviews were in the view chain

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29529 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Doug Simons 2010-02-09 22:05:25 +00:00
parent f47abd817f
commit 7868cd6332
2 changed files with 15 additions and 6 deletions

View file

@ -1,3 +1,9 @@
2010-01-14 Doug Simons <doug.simons@testplant.com>
* Source/NSView.m (-dealloc): Remove subviews AFTER
next/previous key views have been cleaned up, in case
any subviews were in the view chain.
2010-02-09 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSTextStorage.m: Restore return of proxy to user code.
@ -420,7 +426,6 @@
* Source/NSImage.m: Changes to fix bug #28580.
>>>>>>> .r29294
2010-01-15 13:08-EST Gregory John Casamento <greg.casamento@gmail.com>
* Headers/Additions/GNUstepGUI/GSTheme.h: Added method to call

View file

@ -570,11 +570,6 @@ GSSetDragTypes(NSView* obj, NSArray *types)
// Remove all key value bindings for this view.
[GSKeyValueBinding unbindAllForObject: self];
while ([_sub_views count] > 0)
{
[[_sub_views lastObject] removeFromSuperviewWithoutNeedingDisplay];
}
/*
* Remove self from view chain. Try to mimic MacOS-X behavior ...
* We send setNextKeyView: messages to all view for which we are the
@ -669,6 +664,15 @@ GSSetDragTypes(NSView* obj, NSArray *types)
_nextKeyView = 0;
}
/*
* Now remove our subviews, AFTER cleaning up the view chain, in case
* any of our subviews were in the chain.
*/
while ([_sub_views count] > 0)
{
[[_sub_views lastObject] removeFromSuperviewWithoutNeedingDisplay];
}
RELEASE(_matrixToWindow);
RELEASE(_matrixFromWindow);
TEST_RELEASE(_frameMatrix);