Skip to content
This repository was archived by the owner on Mar 15, 2023. It is now read-only.

Commit e72858f

Browse files
author
Jacob van Mourik
committed
Fixed dirty state
1 parent 5dfcf1a commit e72858f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/com/jvms/i18neditor/editor/Editor.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ public boolean saveProject() {
208208
}
209209
}
210210
}
211-
setDirty(error);
211+
if (dirty) {
212+
setDirty(error);
213+
}
212214
return !error;
213215
}
214216

@@ -486,7 +488,7 @@ public void showVersionDialog(boolean newVersionOnly) {
486488

487489
public boolean closeCurrentProject() {
488490
boolean result = true;
489-
if (isDirty()) {
491+
if (dirty) {
490492
int confirm = JOptionPane.showConfirmDialog(this,
491493
MessageBundle.get("dialogs.save.text"),
492494
MessageBundle.get("dialogs.save.title"),
@@ -500,6 +502,9 @@ public boolean closeCurrentProject() {
500502
if (result && project != null) {
501503
storeProjectState();
502504
}
505+
if (result && dirty) {
506+
setDirty(false);
507+
}
503508
return result;
504509
}
505510

0 commit comments

Comments
 (0)