Skip to content

Commit

Permalink
Prepared fix for issue #1020.
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsschmidt1337 committed Jan 13, 2024
1 parent 59cecbe commit ef87ac1
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,12 @@ public boolean saveAs(DatFile dfToSave, String name, String filePath) {
}
if (selected != null) {

if (new DatFile(selected).equals(dfToSave) && filePath == null) {
dfToSave.save();
Editor3DWindow.getWindow().updateTabs();
return false;
}

if (Editor3DWindow.getWindow().isFileNameAllocated(selected, new DatFile(selected), true)) {
MessageBox messageBox = new MessageBox(btnSaveAsPtr[0].getShell(), SWT.ICON_ERROR | SWT.RETRY | SWT.CANCEL);
messageBox.setText(I18n.DIALOG_ALREADY_ALLOCATED_NAME_TITLE);
Expand Down

0 comments on commit ef87ac1

Please sign in to comment.