gui/widget/menue.cpp: dont repaint menu on help key, if no hints

This commit is contained in:
[CST] Focus
2012-07-19 17:30:53 +04:00
parent 821c3e1bff
commit e52367edd8

View File

@@ -691,9 +691,12 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
} }
break; break;
case (CRCInput::RC_help): case (CRCInput::RC_help):
hide(); // FIXME should we switch hints in menu without hints ?
if (has_hints)
hide();
g_settings.show_menu_hints = !g_settings.show_menu_hints; g_settings.show_menu_hints = !g_settings.show_menu_hints;
paint(); if (has_hints)
paint();
break; break;
default: default:
@@ -778,7 +781,7 @@ void CMenuWidget::calcSize()
if (tmpw > width) if (tmpw > width)
width = tmpw; width = tmpw;
if(g_settings.show_menu_hints && (!items[i]->hintIcon.empty() || items[i]->hint != NONEXISTANT_LOCALE)) { if(!items[i]->hintIcon.empty() || items[i]->hint != NONEXISTANT_LOCALE) {
has_hints = true; has_hints = true;
} }
} }