Fixed deactivated menuitem.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4633 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
michael 1999-07-23 00:28:31 +00:00
parent 1460f5b1f5
commit a0a394a632
2 changed files with 13 additions and 8 deletions

View file

@ -140,7 +140,6 @@ static float GSMenuBarHeight = 25.0; // a guess.
- (void)setHighlightedItemIndex: (int)index
{
id anItem;
BOOL _closeASubmenu = NO;
[self lockFocus];
@ -173,20 +172,24 @@ static float GSMenuBarHeight = 25.0; // a guess.
}
if (menuv_highlightedItemIndex != index) {
anItem = [menuv_items_link objectAtIndex: index];
[anItem highlight: YES
withFrame: [self rectOfItemAtIndex: index]
inView: self];
if ([anItem isEnabled])
{
[anItem highlight: YES
withFrame: [self rectOfItemAtIndex: index]
inView: self];
[anItem setState: 1];
[anItem setState: 1];
if ([anItem hasSubmenu] && ![[anItem target] isTornOff])
[[anItem target] display];
if ([anItem hasSubmenu] && ![[anItem target] isTornOff])
[[anItem target] display];
}
// set ivar to new index
menuv_highlightedItemIndex = index;
} else {
} else {
menuv_highlightedItemIndex = -1;
}
}