mirror of https://github.com/stella-emu/stella.git
Dialogs remember and restore their previous focus when being reopened
This commit is contained in:
parent
33f7c5b7e8
commit
b1811f5a9f
|
@ -99,9 +99,12 @@ void Dialog::open()
|
||||||
|
|
||||||
center();
|
center();
|
||||||
|
|
||||||
// (Re)-build the focus list to use for all widgets of all tabs
|
if(_myTabList.size())
|
||||||
for(auto& tabfocus : _myTabList)
|
// (Re)-build the focus list to use for all widgets of all tabs
|
||||||
buildCurrentFocusList(tabfocus.widget->getID());
|
for(auto& tabfocus : _myTabList)
|
||||||
|
buildCurrentFocusList(tabfocus.widget->getID());
|
||||||
|
else
|
||||||
|
buildCurrentFocusList();
|
||||||
|
|
||||||
loadConfig(); // has to be done AFTER (re)building the focus list
|
loadConfig(); // has to be done AFTER (re)building the focus list
|
||||||
|
|
||||||
|
@ -181,8 +184,8 @@ void Dialog::releaseFocus()
|
||||||
for(auto& tabfocus : _myTabList)
|
for(auto& tabfocus : _myTabList)
|
||||||
tabfocus.saveCurrentFocus(_focusedWidget);
|
tabfocus.saveCurrentFocus(_focusedWidget);
|
||||||
|
|
||||||
_focusedWidget->lostFocus();
|
//_focusedWidget->lostFocus();
|
||||||
_focusedWidget = nullptr;
|
//_focusedWidget = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue