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