mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:10:48 +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
7cd4f7630d
commit
9352e96e63
1 changed files with 9 additions and 3 deletions
|
@ -735,6 +735,14 @@ static NSNotificationCenter *nc;
|
||||||
[nc postNotificationName: NSMenuWillSendActionNotification
|
[nc postNotificationName: NSMenuWillSendActionNotification
|
||||||
object: self
|
object: self
|
||||||
userInfo: d];
|
userInfo: d];
|
||||||
|
|
||||||
|
|
||||||
|
if (_popUpButtonCell != nil)
|
||||||
|
{
|
||||||
|
// Tell the popup button, which item was selected
|
||||||
|
[_popUpButtonCell selectItemAtIndex: index];
|
||||||
|
}
|
||||||
|
|
||||||
if ((action = [item action]) != NULL)
|
if ((action = [item action]) != NULL)
|
||||||
{
|
{
|
||||||
[NSApp sendAction: action
|
[NSApp sendAction: action
|
||||||
|
@ -743,9 +751,7 @@ static NSNotificationCenter *nc;
|
||||||
}
|
}
|
||||||
else if (_popUpButtonCell != nil)
|
else if (_popUpButtonCell != nil)
|
||||||
{
|
{
|
||||||
// Tell the popup button, which item was selected
|
if ((action = [_popUpButtonCell action]) != NULL)
|
||||||
[_popUpButtonCell selectItemAtIndex: index];
|
|
||||||
if (NULL != (action = [_popUpButtonCell action]))
|
|
||||||
[NSApp sendAction: action
|
[NSApp sendAction: action
|
||||||
to: [_popUpButtonCell target]
|
to: [_popUpButtonCell target]
|
||||||
from: [_popUpButtonCell controlView]];
|
from: [_popUpButtonCell controlView]];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue