diff options
Diffstat (limited to 'src/main/java/cuchaz/enigma/gui/elements')
| -rw-r--r-- | src/main/java/cuchaz/enigma/gui/elements/MenuBar.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/cuchaz/enigma/gui/elements/MenuBar.java b/src/main/java/cuchaz/enigma/gui/elements/MenuBar.java index f4f0277..dfbfa65 100644 --- a/src/main/java/cuchaz/enigma/gui/elements/MenuBar.java +++ b/src/main/java/cuchaz/enigma/gui/elements/MenuBar.java | |||
| @@ -152,12 +152,8 @@ public class MenuBar extends JMenuBar { | |||
| 152 | if (this.gui.getController().isDirty()) { | 152 | if (this.gui.getController().isDirty()) { |
| 153 | this.gui.showDiscardDiag((response -> { | 153 | this.gui.showDiscardDiag((response -> { |
| 154 | if (response == JOptionPane.YES_OPTION) { | 154 | if (response == JOptionPane.YES_OPTION) { |
| 155 | try { | 155 | gui.saveMapping(); |
| 156 | gui.saveMapping(); | 156 | this.gui.getController().closeMappings(); |
| 157 | this.gui.getController().closeMappings(); | ||
| 158 | } catch (IOException e) { | ||
| 159 | throw new Error(e); | ||
| 160 | } | ||
| 161 | } else if (response == JOptionPane.NO_OPTION) | 157 | } else if (response == JOptionPane.NO_OPTION) |
| 162 | this.gui.getController().closeMappings(); | 158 | this.gui.getController().closeMappings(); |
| 163 | return null; | 159 | return null; |