Add a revertPreviousFocus() helper
This commit is contained in:
@@ -79,6 +79,14 @@ class ModalWindow: public Window
|
|||||||
previousFocus = nullptr;
|
previousFocus = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void revertPreviousFocus()
|
||||||
|
{
|
||||||
|
if (previousFocus) {
|
||||||
|
previousFocus->setFocus(SET_FOCUS_DEFAULT);
|
||||||
|
previousFocus = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Window * previousFocus = nullptr;
|
Window * previousFocus = nullptr;
|
||||||
bool closeAllowed = true;
|
bool closeAllowed = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user