* GormCore/GormViewEditor.m: -editedObjectFrameDidChange:

alter code so that allViews under the editor are collected
	and set to not post notifications.  This change prevents
	a notification/setFrame cycle which was occurring when
	certain controls were added as subviews to NSTabView or
	NSBox.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@36155 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2013-02-17 01:11:32 +00:00
parent 3cd12bee73
commit c92bf0ebfb
2 changed files with 27 additions and 4 deletions

View file

@ -1,3 +1,12 @@
2013-02-16 20:10-EST Gregory John Casamento <greg.casamento@gmail.com>
* GormCore/GormViewEditor.m: -editedObjectFrameDidChange:
alter code so that allViews under the editor are collected
and set to not post notifications. This change prevents
a notification/setFrame cycle which was occurring when
certain controls were added as subviews to NSTabView or
NSBox.
2013-01-26 20:42-EST Gregory John Casamento <greg.casamento@gmail.com>
* GormCore/GormDocument.m: Corrected issue with adding cells to

View file

@ -325,14 +325,28 @@ static BOOL currently_displaying = NO;
- (void) editedObjectFrameDidChange: (id) sender
{
[self setPostsFrameChangedNotifications:NO];
[self setPostsBoundsChangedNotifications:NO];
NSArray *allViews = allSubviews(self);
NSEnumerator *en = [allViews objectEnumerator];
id v = nil;
// Set all views under this view to not post changes...
while((v = [en nextObject]) != nil)
{
[v setPostsFrameChangedNotifications:NO];
[v setPostsBoundsChangedNotifications:NO];
}
// Set the frame and the bounds...
[self setFrame: [_editedObject frame]];
[self setBounds: [_editedObject frame]];
[self setPostsFrameChangedNotifications:YES];
[self setPostsBoundsChangedNotifications:YES];
// Reset all views to post changes as expected...
en = [allViews objectEnumerator];
while((v = [en nextObject]) != nil)
{
[v setPostsFrameChangedNotifications:YES];
[v setPostsBoundsChangedNotifications:YES];
}
}
- (void) frameDidChange: (id) sender