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>
|
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)
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -767,9 +767,9 @@ void FMenuBar::onMouseUp (FMouseEvent* ev)
|
||||||
redraw();
|
redraw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
++iter;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
++iter;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! hasSelectedItem() )
|
if ( ! hasSelectedItem() )
|
||||||
|
|
Loading…
Reference in New Issue