Close sub-menu on right and middle click
This commit is contained in:
parent
9cc95d952b
commit
bf606f3f23
|
@ -933,6 +933,8 @@ void FMenu::onKeyPress (FKeyEvent* ev)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hideSuperMenus();
|
hideSuperMenus();
|
||||||
|
if ( statusBar() )
|
||||||
|
statusBar()->clearMessage();
|
||||||
activatePrevWindow();
|
activatePrevWindow();
|
||||||
raiseWindow (getActiveWindow());
|
raiseWindow (getActiveWindow());
|
||||||
getActiveWindow()->getFocusWidget()->setFocus();
|
getActiveWindow()->getFocusWidget()->setFocus();
|
||||||
|
@ -956,7 +958,18 @@ void FMenu::onKeyPress (FKeyEvent* ev)
|
||||||
void FMenu::onMouseDown (FMouseEvent* ev)
|
void FMenu::onMouseDown (FMouseEvent* ev)
|
||||||
{
|
{
|
||||||
if ( ev->getButton() != LeftButton )
|
if ( ev->getButton() != LeftButton )
|
||||||
|
{
|
||||||
|
if ( open_sub_menu )
|
||||||
|
{
|
||||||
|
// close open sub menu
|
||||||
|
open_sub_menu->hideSubMenus();
|
||||||
|
open_sub_menu->hide();
|
||||||
|
open_sub_menu = 0;
|
||||||
|
updateTerminal();
|
||||||
|
flush_out();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ( mouse_down )
|
if ( mouse_down )
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue