Don't add ourselves to the superview if we are the contentView of an NSBox.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14337 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2002-08-27 03:06:29 +00:00
parent 24c44dd051
commit 4ee8c3ff31
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2002-08-26 Adam Fedor <fedor@gnu.org>
* Model/GMAppKit.m (-initWithModelUnarchiver:): Don't add ourselves
to the superview if we are the contentView of an NSBox.
2002-08-24 Adam Fedor <fedor@gnu.org>
* Source/NSGraphicsContext.m: More documentation.

View file

@ -1159,7 +1159,10 @@ void __dummy_GMAppKit_functionForLinking() {}
self = [super initWithModelUnarchiver:unarchiver];
superview = [unarchiver decodeObjectWithName:@"superview"];
[superview addSubview:self];
/* If we are the content view of an NSBox, don't add ourselves to it.
This is done later in the NSBox unachiver method */
if ([superview isKindOfClass: [NSBox class]] == NO)
[superview addSubview:self];
subviews = [unarchiver decodeObjectWithName:@"subviews"];
for (i = 0, count = [subviews count]; i < count; i++)