From 08601c23d3960e724223767f0ad5460287ddfd9d Mon Sep 17 00:00:00 2001 From: mathias Date: Fri, 29 Apr 2005 11:20:41 +0000 Subject: enabled MenuItems / Separators are not clickable and the same logic should apply to keys. --- src/FbTk/Menu.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 4d6a6c0..fbf7e45 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc @@ -830,10 +830,9 @@ bool Menu::isItemSelectable(unsigned int index) const { if (index >= menuitems.size()) return false; const MenuItem *item = find(index); - if (!item) - return false; - - return (typeid(*item) != typeid(FbTk::MenuSeparator)); + return (!item || + (typeid(*item) == typeid(FbTk::MenuSeparator)) || + !item->isEnabled()) ? false : true; } -- cgit v0.11.2