Add new classes FCheckMenuItem and FRadioMenuItem

This commit is contained in:
Markus Gans 2015-11-15 22:31:55 +01:00
parent 0c0453eb79
commit bfac128c3d
2 changed files with 6 additions and 10 deletions

View File

@ -218,16 +218,9 @@ void FMenu::hideSuperMenus()
if ( isMenuBar(super) )
{
FMenuBar* mbar = reinterpret_cast<FMenuBar*>(super);
FMenuItem* selectedMenuItem = mbar->getSelectedItem();
if ( selectedMenuItem )
{
selectedMenuItem->unsetSelected();
selectedMenuItem = 0;
mbar->mouse_down = false;
mbar->drop_down = false;
mbar->redraw();
}
if ( mbar->hasSelectedItem() )
mbar->leaveMenuBar();
}
else if ( isMenu(super) )
{

View File

@ -446,6 +446,9 @@ void FMenuBar::adjustSize()
void FMenuBar::leaveMenuBar()
{
resetMenu();
if ( hasSelectedItem() )
getSelectedItem()->unsetSelected();
setSelectedItem(0);
redraw();
activatePrevWindow();
getActiveWindow()->getFocusWidget()->setFocus();
@ -454,7 +457,7 @@ void FMenuBar::leaveMenuBar()
statusBar()->drawMessage();
updateTerminal();
flush_out();
drop_down = false;
mouse_down = false;
}
// public methods of FMenuBar