mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 06:28:54 +00:00
Always select the popup item in performAction
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13920 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8e986bb0db
commit
33a9bfaf78
1 changed files with 9 additions and 3 deletions
|
@ -735,6 +735,14 @@ static NSNotificationCenter *nc;
|
|||
[nc postNotificationName: NSMenuWillSendActionNotification
|
||||
object: self
|
||||
userInfo: d];
|
||||
|
||||
|
||||
if (_popUpButtonCell != nil)
|
||||
{
|
||||
// Tell the popup button, which item was selected
|
||||
[_popUpButtonCell selectItemAtIndex: index];
|
||||
}
|
||||
|
||||
if ((action = [item action]) != NULL)
|
||||
{
|
||||
[NSApp sendAction: action
|
||||
|
@ -743,9 +751,7 @@ static NSNotificationCenter *nc;
|
|||
}
|
||||
else if (_popUpButtonCell != nil)
|
||||
{
|
||||
// Tell the popup button, which item was selected
|
||||
[_popUpButtonCell selectItemAtIndex: index];
|
||||
if (NULL != (action = [_popUpButtonCell action]))
|
||||
if ((action = [_popUpButtonCell action]) != NULL)
|
||||
[NSApp sendAction: action
|
||||
to: [_popUpButtonCell target]
|
||||
from: [_popUpButtonCell controlView]];
|
||||
|
|
Loading…
Reference in a new issue