* Source/NSMenu.m (-performActionForItemAtIndex:): Check for the

popup button cell and its action, before checking for the item
action. This caused a problem due to NIB decoding changes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34642 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2012-01-26 22:38:50 +00:00
parent af8b7fd367
commit a5612f4bcb
2 changed files with 13 additions and 8 deletions

View file

@ -1310,18 +1310,17 @@ static BOOL menuBarVisible = YES;
[_popUpButtonCell selectItemAtIndex: index];
}
if ((action = [item action]) != NULL)
if (_popUpButtonCell != nil && (action = [_popUpButtonCell action]) != NULL)
{
[NSApp sendAction: action
to: [item target]
from: item];
to: [_popUpButtonCell target]
from: [_popUpButtonCell controlView]];
}
else if (_popUpButtonCell != nil)
else if ((action = [item action]) != NULL)
{
if ((action = [_popUpButtonCell action]) != NULL)
[NSApp sendAction: action
to: [_popUpButtonCell target]
from: [_popUpButtonCell controlView]];
[NSApp sendAction: action
to: [item target]
from: item];
}
[nc postNotificationName: NSMenuDidSendActionNotification