Source/NSSplitView.m

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14235 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Pierre-Yves Rivaille 2002-08-05 11:56:29 +00:00
parent 898524e393
commit f4cc3d1d83
2 changed files with 26 additions and 4 deletions

View file

@ -1,4 +1,17 @@
2002-08-02 Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
2002-08-05 Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
* Source/NSSplitView.m
[NSplitView -setFrame:]:
adjust the subviews.
[NSSplitView -resizeWithOldSuperviewSize:]:
send the splitview's old size not the superview's old size to
[NSSplitView -_adjustSubviews:]
[NSSplitView -displayIfNeededInRectIgnoringOpacity:]
[NSSplitView -displayRectIgnoringOpacity:]
set _never_displayed_before before calling _adjustSubviews.
It could lead to a loop, if the delegate was calling -display.
2002-08-03 Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
* Source/NSView.m ([NSView -replaceSubview:withSubview]):
The replacing subview was not inserted at the old subview's location.

View file

@ -802,10 +802,19 @@ static inline NSPoint centerSizeInRect(NSSize innerSize, NSRect outerRect)
return YES;
}
- (void) setFrame: (NSRect) newFrame
{
NSRect oldFrame = [self frame];
[super setFrame: newFrame];
[self _adjustSubviews: oldFrame.size];
[_window invalidateCursorRectsForView: self];
}
- (void) resizeWithOldSuperviewSize: (NSSize)oldSize
{
NSRect oldFrame = [self frame];
[super resizeWithOldSuperviewSize: oldSize];
[self _adjustSubviews: oldSize];
[self _adjustSubviews: oldFrame.size];
[_window invalidateCursorRectsForView: self];
}
@ -818,8 +827,8 @@ static inline NSPoint centerSizeInRect(NSSize innerSize, NSRect outerRect)
if (_never_displayed_before == YES)
{
[self _adjustSubviews: _frame.size];
_never_displayed_before = NO;
[self _adjustSubviews: _frame.size];
}
[super displayIfNeededInRectIgnoringOpacity: aRect];
@ -834,8 +843,8 @@ static inline NSPoint centerSizeInRect(NSSize innerSize, NSRect outerRect)
if (_never_displayed_before == YES)
{
[self _adjustSubviews: _frame.size];
_never_displayed_before = NO;
[self _adjustSubviews: _frame.size];
}
[super displayRectIgnoringOpacity: aRect];