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();
|
||||
|
||||
// (Re)-build the focus list to use for all widgets of all tabs
|
||||
for(auto& tabfocus : _myTabList)
|
||||
buildCurrentFocusList(tabfocus.widget->getID());
|
||||
if(_myTabList.size())
|
||||
// (Re)-build the focus list to use for all widgets of all tabs
|
||||
for(auto& tabfocus : _myTabList)
|
||||
buildCurrentFocusList(tabfocus.widget->getID());
|
||||
else
|
||||
buildCurrentFocusList();
|
||||
|
||||
loadConfig(); // has to be done AFTER (re)building the focus list
|
||||
|
||||
|
@ -181,8 +184,8 @@ void Dialog::releaseFocus()
|
|||
for(auto& tabfocus : _myTabList)
|
||||
tabfocus.saveCurrentFocus(_focusedWidget);
|
||||
|
||||
_focusedWidget->lostFocus();
|
||||
_focusedWidget = nullptr;
|
||||
//_focusedWidget->lostFocus();
|
||||
//_focusedWidget = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue