aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/macgui/macmenu.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp
index 61fa02b7b9..9d05c76fc3 100644
--- a/graphics/macgui/macmenu.cpp
+++ b/graphics/macgui/macmenu.cpp
@@ -836,15 +836,13 @@ bool MacMenu::mouseClick(int x, int y) {
return false;
if (_menustack.size() > 0 && _menustack.back()->bbox.contains(x, y)) {
- MacMenuSubMenu *it = _menustack.back();
- int numSubItem = MIN<int>((y - it->bbox.top) / kMenuDropdownItemHeight, it->subitems.size() - 1);
+ MacMenuSubMenu *menu = _menustack.back();
+ int numSubItem = MIN<int>((y - menu->bbox.top) / kMenuDropdownItemHeight, menu->subitems.size() - 1);
if (numSubItem != _activeSubItem) {
_activeSubItem = numSubItem;
+ menu->highlight = _activeSubItem;
- it->highlight = _activeSubItem;
-
- renderSubmenu(it);
_contentIsDirty = true;
}
@@ -873,11 +871,8 @@ bool MacMenu::mouseClick(int x, int y) {
MacMenuSubMenu *menu = _menustack.back();
_activeSubItem = MIN<int>((y - menu->bbox.top) / kMenuDropdownItemHeight, menu->subitems.size() - 1);
-
menu->highlight = _activeSubItem;
- renderSubmenu(menu);
-
_contentIsDirty = true;
return true;
@@ -888,7 +883,6 @@ bool MacMenu::mouseClick(int x, int y) {
_activeSubItem = -1;
if (_menustack.size()) {
- renderSubmenu(_menustack.back());
_contentIsDirty = true;
}