Added check for no clean index

This commit is contained in:
parax0 2016-03-16 22:22:10 -06:00
parent 7bc7a7a610
commit f19e5c1153
1 changed files with 8 additions and 0 deletions

View File

@ -677,6 +677,14 @@ void CWorldEditor::OnUndoStackIndexChanged()
int CurrentIndex = mUndoStack.index();
int CleanIndex = mUndoStack.cleanIndex();
if (CleanIndex == -1)
{
if (!isWindowModified())
mUndoStack.setClean();
return;
}
if (CurrentIndex == CleanIndex)
setWindowModified(false);