Add new classes FCheckMenuItem and FRadioMenuItem
This commit is contained in:
parent
0c0453eb79
commit
bfac128c3d
|
@ -218,16 +218,9 @@ void FMenu::hideSuperMenus()
|
||||||
if ( isMenuBar(super) )
|
if ( isMenuBar(super) )
|
||||||
{
|
{
|
||||||
FMenuBar* mbar = reinterpret_cast<FMenuBar*>(super);
|
FMenuBar* mbar = reinterpret_cast<FMenuBar*>(super);
|
||||||
FMenuItem* selectedMenuItem = mbar->getSelectedItem();
|
|
||||||
|
|
||||||
if ( selectedMenuItem )
|
if ( mbar->hasSelectedItem() )
|
||||||
{
|
mbar->leaveMenuBar();
|
||||||
selectedMenuItem->unsetSelected();
|
|
||||||
selectedMenuItem = 0;
|
|
||||||
mbar->mouse_down = false;
|
|
||||||
mbar->drop_down = false;
|
|
||||||
mbar->redraw();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if ( isMenu(super) )
|
else if ( isMenu(super) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -446,6 +446,9 @@ void FMenuBar::adjustSize()
|
||||||
void FMenuBar::leaveMenuBar()
|
void FMenuBar::leaveMenuBar()
|
||||||
{
|
{
|
||||||
resetMenu();
|
resetMenu();
|
||||||
|
if ( hasSelectedItem() )
|
||||||
|
getSelectedItem()->unsetSelected();
|
||||||
|
setSelectedItem(0);
|
||||||
redraw();
|
redraw();
|
||||||
activatePrevWindow();
|
activatePrevWindow();
|
||||||
getActiveWindow()->getFocusWidget()->setFocus();
|
getActiveWindow()->getFocusWidget()->setFocus();
|
||||||
|
@ -454,7 +457,7 @@ void FMenuBar::leaveMenuBar()
|
||||||
statusBar()->drawMessage();
|
statusBar()->drawMessage();
|
||||||
updateTerminal();
|
updateTerminal();
|
||||||
flush_out();
|
flush_out();
|
||||||
drop_down = false;
|
mouse_down = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public methods of FMenuBar
|
// public methods of FMenuBar
|
||||||
|
|
Loading…
Reference in New Issue