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:
stoyan 2003-03-25 19:58:19 +00:00
parent c44ad09003
commit 1d95456d95

View file

@ -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];
} }