FDialog focus fix
This commit is contained in:
parent
07bcf76bf4
commit
fbb3c8ef11
|
@ -1,5 +1,6 @@
|
|||
2016-07-10 Markus Gans <guru.mail@muenster.de>
|
||||
* Remove obsolete code from FDialog destructor
|
||||
* FDialog focus fix
|
||||
|
||||
2016-07-08 Markus Gans <guru.mail@muenster.de>
|
||||
* Better code readability: control structures (if/else, while, switch)
|
||||
|
|
|
@ -554,7 +554,7 @@ void FDialog::onMouseDown (FMouseEvent* ev)
|
|||
FWidget* old_focus = FWidget::getFocusWidget();
|
||||
setActiveWindow(this);
|
||||
|
||||
if ( focus_widget )
|
||||
if ( focus_widget && numOfFocusableChildren() > 1 )
|
||||
{
|
||||
focus_widget->setFocus();
|
||||
focus_widget->redraw();
|
||||
|
@ -607,7 +607,7 @@ void FDialog::onMouseDown (FMouseEvent* ev)
|
|||
FWidget* old_focus = FWidget::getFocusWidget();
|
||||
setActiveWindow(this);
|
||||
|
||||
if ( focus_widget )
|
||||
if ( focus_widget && numOfFocusableChildren() > 1 )
|
||||
{
|
||||
focus_widget->setFocus();
|
||||
focus_widget->redraw();
|
||||
|
@ -638,7 +638,7 @@ void FDialog::onMouseDown (FMouseEvent* ev)
|
|||
FWidget* old_focus = FWidget::getFocusWidget();
|
||||
setActiveWindow(this);
|
||||
|
||||
if ( focus_widget )
|
||||
if ( focus_widget && numOfFocusableChildren() > 1 )
|
||||
{
|
||||
focus_widget->setFocus();
|
||||
focus_widget->redraw();
|
||||
|
|
|
@ -767,10 +767,10 @@ void FMenuBar::onMouseUp (FMouseEvent* ev)
|
|||
redraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! hasSelectedItem() )
|
||||
leaveMenuBar();
|
||||
|
|
Loading…
Reference in New Issue