diff --git a/ChangeLog b/ChangeLog index 28cec30d4..1642303e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-08-02 Pierre-Yves Rivaille + + * Source/NSView.m ([NSView -replaceSubview:withSubview]): + The replacing subview was not inserted at the old subview's location. + 2002-08-02 Adam Fedor * Merge changes from 0.8.0 into main branch. diff --git a/Source/NSView.m b/Source/NSView.m index 4e8f525ae..dbd8cfdc6 100644 --- a/Source/NSView.m +++ b/Source/NSView.m @@ -595,7 +595,8 @@ GSSetDragTypes(NSView* obj, NSArray *types) [newView viewWillMoveToWindow: _window]; [newView viewWillMoveToSuperview: self]; [newView setNextResponder: self]; - [_sub_views addObject: newView]; + [_sub_views insertObject: newView + atIndex: index]; _rFlags.has_subviews = 1; [newView resetCursorRects]; [newView setNeedsDisplay: YES];