mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 07:41:11 +00:00
Prevent recursive notification sequence
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@35617 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e80b42db50
commit
9e04422b24
2 changed files with 10 additions and 3 deletions
|
@ -141,6 +141,7 @@ PACKAGE_SCOPE
|
|||
BOOL _is_rotated_from_base;
|
||||
BOOL _is_rotated_or_scaled_from_base;
|
||||
BOOL _post_frame_changes;
|
||||
BOOL _posting_frame_changes;
|
||||
BOOL _post_bounds_changes;
|
||||
BOOL _autoresizes_subviews;
|
||||
BOOL _coordinates_valid;
|
||||
|
|
|
@ -1223,10 +1223,12 @@ static NSSize _computeScale(NSSize fs, NSSize bs)
|
|||
}
|
||||
[self resetCursorRects];
|
||||
[self resizeSubviewsWithOldSize: old_size];
|
||||
if (_post_frame_changes)
|
||||
if (_post_frame_changes && (_posting_frame_changes == NO))
|
||||
{
|
||||
_posting_frame_changes = YES;
|
||||
[nc postNotificationName: NSViewFrameDidChangeNotification
|
||||
object: self];
|
||||
_posting_frame_changes = NO;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1244,10 +1246,12 @@ static NSSize _computeScale(NSSize fs, NSSize bs)
|
|||
}
|
||||
[self _setFrameAndClearAutoresizingError: newFrame];
|
||||
[self resetCursorRects];
|
||||
if (_post_frame_changes)
|
||||
if (_post_frame_changes && (_posting_frame_changes == NO))
|
||||
{
|
||||
_posting_frame_changes = YES;
|
||||
[nc postNotificationName: NSViewFrameDidChangeNotification
|
||||
object: self];
|
||||
_posting_frame_changes = NO;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1309,10 +1313,12 @@ static NSSize _computeScale(NSSize fs, NSSize bs)
|
|||
}
|
||||
[self resetCursorRects];
|
||||
[self resizeSubviewsWithOldSize: old_size];
|
||||
if (_post_frame_changes)
|
||||
if (_post_frame_changes && (_posting_frame_changes == NO))
|
||||
{
|
||||
_posting_frame_changes = YES;
|
||||
[nc postNotificationName: NSViewFrameDidChangeNotification
|
||||
object: self];
|
||||
_posting_frame_changes = NO;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue