mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-04 00:20:43 +00:00
reset highlighted items in a submenu that we leave for a supermenu
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16264 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c44ad09003
commit
1d95456d95
1 changed files with 14 additions and 7 deletions
|
@ -1115,10 +1115,17 @@ _addLeftBorderOffsetToRect(NSRect aRect)
|
||||||
[[candidateMenu window] frame], NO))
|
[[candidateMenu window] frame], NO))
|
||||||
{
|
{
|
||||||
// The call to fetch attachedMenu is not needed. But putting
|
// The call to fetch attachedMenu is not needed. But putting
|
||||||
// it here avoids flicker when we go back to an ancester meu
|
// it here avoids flicker when we go back to an ancestor
|
||||||
// and the attached menu is alreay correct.
|
// menu and the attached menu is already correct.
|
||||||
[[[candidateMenu attachedMenu] menuRepresentation]
|
[[[candidateMenu attachedMenu] menuRepresentation]
|
||||||
detachSubmenu];
|
detachSubmenu];
|
||||||
|
|
||||||
|
// Reset highlighted index for this menu.
|
||||||
|
// This way if we return to this submenu later there
|
||||||
|
// won't be a highlighted item.
|
||||||
|
[[[candidateMenu attachedMenu] menuRepresentation]
|
||||||
|
setHighlightedItemIndex: -1];
|
||||||
|
|
||||||
return [[candidateMenu menuRepresentation]
|
return [[candidateMenu menuRepresentation]
|
||||||
trackWithEvent: original];
|
trackWithEvent: original];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue