bugfix: 'HideMenus' command did not work if the user 'opened' an empty submenu.

'openeing' such an empty submenu lead to an already hidden menu referenced by
the 'shown' pointer
This commit is contained in:
Mathias Gumz 2009-09-23 22:21:13 +02:00
parent cfd055064a
commit 4663a9591e
2 changed files with 6 additions and 1 deletions

View file

@ -1,5 +1,10 @@
(Format: Year/Month/Day)
Changes for 1.1.2
*09/09/23:
* Bugfix: Empty submenus lead to misfunction of the 'HideMenus' command (Mathias)
FbTk/Menu.cc
*09/09/12:
* Implemented visibility of titlebar buttons via the apps file (Mathias)
Window.cc

View file

@ -759,7 +759,7 @@ void Menu::drawSubmenu(unsigned int index) {
if (! m_moving)
clearItem(index);
if (! item->submenu()->isVisible()) {
if (! item->submenu()->isVisible() && item->submenu()->numberOfItems() > 0) {
shown = item->submenu();
item->showSubmenu();
item->submenu()->raise();