UI: changed ESC to BACKSPACE in choose dialog hotkeys (compatibility fixes);

This commit is contained in:
Oleg Agafonov 2020-01-18 09:34:02 +04:00
parent ce60a9d75b
commit 7da62e13ec
2 changed files with 3 additions and 3 deletions

View file

@ -500,6 +500,7 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
AbilityPickerAction action = (AbilityPickerAction) obj; AbilityPickerAction action = (AbilityPickerAction) obj;
if (action.id == null) { if (action.id == null) {
cancel(); cancel();
break;
} }
} }
} }
@ -555,8 +556,8 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
} }
}); });
// cancel key (esc) // cancel key (esc can be lost by focus on exile window popup)
panel.getInputMap(c).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), commandsPrefix + "_CHOOSE_CANCEL"); panel.getInputMap(c).put(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0), commandsPrefix + "_CHOOSE_CANCEL");
panel.getActionMap().put(commandsPrefix + "_CHOOSE_CANCEL", new AbstractAction() { panel.getActionMap().put(commandsPrefix + "_CHOOSE_CANCEL", new AbstractAction() {
@Override @Override
public void actionPerformed(ActionEvent actionEvent) { public void actionPerformed(ActionEvent actionEvent) {

View file

@ -77,7 +77,6 @@ public class CardInfoWindowDialog extends MageDialog {
} }
this.setTitelBarToolTip(name); this.setTitelBarToolTip(name);
setGUISize(); setGUISize();
} }
public void cleanUp() { public void cleanUp() {