mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 23:31:02 +00:00
Changed decoding to support decoding of NSBox too (that class is special
because it overrides -addSubview:) git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5566 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
85dd064e7e
commit
fe990f712f
1 changed files with 17 additions and 1 deletions
|
@ -2504,7 +2504,23 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
e = [subs objectEnumerator];
|
||||
while ((sub = [e nextObject]) != nil)
|
||||
{
|
||||
[self addSubview: sub];
|
||||
// We can't use [self addSubview: sub]; because NSBox overrides
|
||||
// that method: we need to take the long way.
|
||||
if ([self isDescendantOf: sub])
|
||||
{
|
||||
NSLog(@"Operation addSubview: creates a loop in the views tree!\n");
|
||||
continue;
|
||||
}
|
||||
RETAIN (sub);
|
||||
[sub removeFromSuperview];
|
||||
[sub viewWillMoveToWindow: window];
|
||||
[sub viewWillMoveToSuperview: self];
|
||||
[sub setNextResponder: self];
|
||||
[sub_views addObject: sub];
|
||||
_rFlags.has_subviews = 1;
|
||||
[sub resetCursorRects];
|
||||
[sub setNeedsDisplay: YES];
|
||||
RELEASE(sub);
|
||||
}
|
||||
RELEASE(subs);
|
||||
|
||||
|
|
Loading…
Reference in a new issue