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);