avoids closing the window if file is unsaved, closes #619

This commit is contained in:
hneemann 2021-01-25 14:54:24 +01:00
parent a341ef3b4d
commit 9332febb1f

View File

@ -116,8 +116,10 @@ public class ClosingWindowListener extends WindowAdapter {
if (r == JOptionPane.YES_OPTION || r == JOptionPane.NO_OPTION) {
if (r == JOptionPane.YES_OPTION) {
guiCloser.saveChanges();
}
guiCloser.closeGUI();
if (!guiCloser.isStateChanged())
guiCloser.closeGUI();
} else
guiCloser.closeGUI();
}
} else {
guiCloser.closeGUI();