Focus issue
This commit is contained in:
+7
-1
@@ -39,9 +39,10 @@ class ModalWindow: public Window
|
||||
if (_deleted)
|
||||
return;
|
||||
|
||||
if (previousFocus) {
|
||||
if (previousFocus && (!focusWindow || focusWindow->isChild(this))) {
|
||||
previousFocus->setFocus(SET_FOCUS_DEFAULT);
|
||||
}
|
||||
|
||||
Window::deleteLater();
|
||||
}
|
||||
|
||||
@@ -73,6 +74,11 @@ class ModalWindow: public Window
|
||||
closeAllowed = value;
|
||||
}
|
||||
|
||||
void forgetPreviousFocus()
|
||||
{
|
||||
previousFocus = nullptr;
|
||||
}
|
||||
|
||||
protected:
|
||||
Window * previousFocus = nullptr;
|
||||
bool closeAllowed = true;
|
||||
|
||||
Reference in New Issue
Block a user