Don't save the file in the 'opened a new file' commit when 'App/Auto/Save on Every Change' is enabled as it's not actually a change

Originally committed to SVN as r6316.
This commit is contained in:
Thomas Goyne 2012-01-19 19:46:01 +00:00
parent e4b2f1b509
commit 6a091e3ba2
1 changed files with 2 additions and 4 deletions

View File

@ -659,10 +659,8 @@ int AssFile::Commit(wxString desc, int type, int amendId, AssEntry *single_line)
UndoStack.pop_front();
}
if (OPT_GET("App/Auto/Save on Every Change")->GetBool()) {
if (!filename.empty() && CanSave())
Save(filename);
}
if (UndoStack.size() > 1 && OPT_GET("App/Auto/Save on Every Change")->GetBool() && !filename.empty() && CanSave())
Save(filename);
AnnounceCommit(type);
return commitId;