FDialog focus fix

This commit is contained in:
Markus Gans 2016-07-10 03:51:20 +02:00
parent 07bcf76bf4
commit fbb3c8ef11
3 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,6 @@
2016-07-10 Markus Gans <guru.mail@muenster.de> 2016-07-10 Markus Gans <guru.mail@muenster.de>
* Remove obsolete code from FDialog destructor * Remove obsolete code from FDialog destructor
* FDialog focus fix
2016-07-08 Markus Gans <guru.mail@muenster.de> 2016-07-08 Markus Gans <guru.mail@muenster.de>
* Better code readability: control structures (if/else, while, switch) * Better code readability: control structures (if/else, while, switch)

View File

@ -554,7 +554,7 @@ void FDialog::onMouseDown (FMouseEvent* ev)
FWidget* old_focus = FWidget::getFocusWidget(); FWidget* old_focus = FWidget::getFocusWidget();
setActiveWindow(this); setActiveWindow(this);
if ( focus_widget ) if ( focus_widget && numOfFocusableChildren() > 1 )
{ {
focus_widget->setFocus(); focus_widget->setFocus();
focus_widget->redraw(); focus_widget->redraw();
@ -607,7 +607,7 @@ void FDialog::onMouseDown (FMouseEvent* ev)
FWidget* old_focus = FWidget::getFocusWidget(); FWidget* old_focus = FWidget::getFocusWidget();
setActiveWindow(this); setActiveWindow(this);
if ( focus_widget ) if ( focus_widget && numOfFocusableChildren() > 1 )
{ {
focus_widget->setFocus(); focus_widget->setFocus();
focus_widget->redraw(); focus_widget->redraw();
@ -638,7 +638,7 @@ void FDialog::onMouseDown (FMouseEvent* ev)
FWidget* old_focus = FWidget::getFocusWidget(); FWidget* old_focus = FWidget::getFocusWidget();
setActiveWindow(this); setActiveWindow(this);
if ( focus_widget ) if ( focus_widget && numOfFocusableChildren() > 1 )
{ {
focus_widget->setFocus(); focus_widget->setFocus();
focus_widget->redraw(); focus_widget->redraw();

View File

@ -767,9 +767,9 @@ void FMenuBar::onMouseUp (FMouseEvent* ev)
redraw(); redraw();
} }
} }
++iter;
} }
++iter;
} }
if ( ! hasSelectedItem() ) if ( ! hasSelectedItem() )