From f19e5c1153377327641bdfaec3c63a627ca281b9 Mon Sep 17 00:00:00 2001 From: parax0 Date: Wed, 16 Mar 2016 22:22:10 -0600 Subject: [PATCH] Added check for no clean index --- src/Editor/WorldEditor/CWorldEditor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Editor/WorldEditor/CWorldEditor.cpp b/src/Editor/WorldEditor/CWorldEditor.cpp index 1a104c78..1af81406 100644 --- a/src/Editor/WorldEditor/CWorldEditor.cpp +++ b/src/Editor/WorldEditor/CWorldEditor.cpp @@ -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);