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

View file

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