* Source/NSView.m (-setHidden:): Fix un-hiding of hidden views, loaded

from nib's, with subviews. The subview coordinates just need to be
invalidated when the view is unhidden.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29416 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2010-01-27 07:40:54 +00:00
parent b9bbc50a11
commit 27d0e485e3
3 changed files with 24 additions and 0 deletions

View file

@ -2801,6 +2801,18 @@ in the main thread.
[GSDisplayServer addDragTypes: t toWindow: _window];
}
}
if (_rFlags.has_subviews)
{
// The _visibleRect of subviews will be NSZeroRect, because when they
// were calculated in -[_rebuildCoordinates], they were intersected
// with the result of calling -[visibleRect] on the hidden superview,
// which returns NSZeroRect for hidden views.
//
// So, recalculate the subview coordinates now to make them correct.
[_sub_views makeObjectsPerformSelector:
@selector(_invalidateCoordinates)];
}
}
[self setNeedsDisplay: YES];
}