KEYMAPPER: Skip GUI keymap when displaying active keymap in keymapper dialog
This fixes a problem where opening the keymapper dialog would cause the current game keymap to be displayed as the active keymap but then changing the keymap selection back to it would cause the GUI keymap to be displayed as the active one. The GUI keymap was indeed at the top of the stack but that's not the desired effect. Also move the pushing and popping of the keymap to Dialog::Open/Close Also constantify the GUI keymap name
This commit is contained in:
parent
ac85d134b3
commit
a5082ffa5d
5 changed files with 31 additions and 20 deletions
|
@ -75,7 +75,6 @@ int Dialog::runModal() {
|
|||
}
|
||||
|
||||
void Dialog::open() {
|
||||
|
||||
_result = 0;
|
||||
_visible = true;
|
||||
g_gui.openDialog(this);
|
||||
|
@ -87,6 +86,10 @@ void Dialog::open() {
|
|||
}
|
||||
|
||||
setFocusWidget(w);
|
||||
#ifdef ENABLE_KEYMAPPER
|
||||
g_gui.initKeymap();
|
||||
g_gui.pushKeymap();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Dialog::close() {
|
||||
|
@ -98,6 +101,10 @@ void Dialog::close() {
|
|||
}
|
||||
releaseFocus();
|
||||
g_gui.closeTopDialog();
|
||||
#ifdef ENABLE_KEYMAPPER
|
||||
g_gui.popKeymap();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void Dialog::reflowLayout() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue