mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 06:00:44 +00:00
Fix to prevent re-adding actions from menu.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@18523 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
055582406c
commit
b03b6af507
2 changed files with 19 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-02-01 18:21 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormDocument.m: -[GormDocument attachObject:toParent:]
|
||||
Added code to prevent menu actions from being re-added when
|
||||
clicking on menu items.
|
||||
|
||||
2004-01-31 21:21 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Palettes/0Menus/GormMenuEditor.m: -[GormMenuEditor activate]
|
||||
|
|
|
@ -224,6 +224,16 @@ static NSImage *classesImage = nil;
|
|||
- (void) attachObject: (id)anObject toParent: (id)aParent
|
||||
{
|
||||
NSArray *old;
|
||||
BOOL newObject = NO;
|
||||
|
||||
// if the object is already attached, don't bother attaching it again.
|
||||
/*
|
||||
if([self nameForObject: anObject] != nil)
|
||||
{
|
||||
// object already attached.
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Create a connector that links this object to its parent.
|
||||
|
@ -252,6 +262,7 @@ static NSImage *classesImage = nil;
|
|||
*/
|
||||
if ([self nameForObject: anObject] == nil)
|
||||
{
|
||||
newObject = YES;
|
||||
[self setName: nil forObject: anObject];
|
||||
}
|
||||
|
||||
|
@ -310,7 +321,8 @@ static NSImage *classesImage = nil;
|
|||
// This is done so that any palette items which have predefined connections will be
|
||||
// shown in the connections list.
|
||||
if([anObject respondsToSelector: @selector(action)] == YES &&
|
||||
[anObject respondsToSelector: @selector(target)] == YES)
|
||||
[anObject respondsToSelector: @selector(target)] == YES &&
|
||||
newObject == YES)
|
||||
{
|
||||
SEL sel = [anObject action];
|
||||
|
||||
|
|
Loading…
Reference in a new issue