MenuItem::isEnabled() is sufficient to decide Menu::isItemSelectable()

MenuSeparator is never enabled since it returns always 'false' in its
implementation of isEnabled(). no need to use RTTI imho.
This commit is contained in:
Mathias Gumz 2011-01-15 21:37:45 +01:00
parent bb480030f5
commit 05a52116df

View file

@ -842,9 +842,7 @@ bool Menu::isItemSelectable(unsigned int index) const {
if (index >= menuitems.size()) return false;
const MenuItem *item = find(index);
return (!item ||
(typeid(*item) == typeid(FbTk::MenuSeparator)) ||
!item->isEnabled()) ? false : true;
return (!item || !item->isEnabled()) ? false : true;
}