mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:00:48 +00:00
Prevent exception when subview is added at the end of the subview list.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21073 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3c1963e1a3
commit
06956fd6c1
2 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-04-08 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSView.m (-addSubview:positioned:relativeTo:): Don't
|
||||||
|
increase index for subview added at the end. Based on patch by
|
||||||
|
Matthias Hengartner <hengartner@ivt.baug.ethz.ch>.
|
||||||
|
|
||||||
2005-04-03 14:53 Gregory John Casamento <greg_casamento@yahoo.com>
|
2005-04-03 14:53 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* Source/NSCustomImageRep.m: Allow drawing if the delegate is
|
* Source/NSCustomImageRep.m: Allow drawing if the delegate is
|
||||||
|
|
|
@ -474,6 +474,11 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
else
|
else
|
||||||
index = [_sub_views count];
|
index = [_sub_views count];
|
||||||
}
|
}
|
||||||
|
else if (place != NSWindowBelow)
|
||||||
|
{
|
||||||
|
index += 1;
|
||||||
|
}
|
||||||
|
|
||||||
RETAIN(aView);
|
RETAIN(aView);
|
||||||
[aView removeFromSuperview];
|
[aView removeFromSuperview];
|
||||||
if (aView->_coordinates_valid)
|
if (aView->_coordinates_valid)
|
||||||
|
@ -483,10 +488,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
[aView viewWillMoveToWindow: _window];
|
[aView viewWillMoveToWindow: _window];
|
||||||
[aView viewWillMoveToSuperview: self];
|
[aView viewWillMoveToSuperview: self];
|
||||||
[aView setNextResponder: self];
|
[aView setNextResponder: self];
|
||||||
if (place == NSWindowBelow)
|
[_sub_views insertObject: aView atIndex: index];
|
||||||
[_sub_views insertObject: aView atIndex: index];
|
|
||||||
else
|
|
||||||
[_sub_views insertObject: aView atIndex: index+1];
|
|
||||||
_rFlags.has_subviews = 1;
|
_rFlags.has_subviews = 1;
|
||||||
[aView resetCursorRects];
|
[aView resetCursorRects];
|
||||||
[aView setNeedsDisplay: YES];
|
[aView setNeedsDisplay: YES];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue