Skip to content

Commit 3039880

Browse files
committed
Merge pull request #111136 from KoBeWi/redo_consistency_left_the_chat
Set correct saved history after clearing
2 parents 1cab5e1 + ea452f2 commit 3039880

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

editor/editor_undo_redo_manager.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,9 @@ void EditorUndoRedoManager::clear_history(int p_idx, bool p_increase_version) {
438438
history.undo_stack.clear();
439439
history.redo_stack.clear();
440440

441-
if (!p_increase_version) {
441+
if (p_increase_version) {
442+
history.saved_version = 0;
443+
} else {
442444
set_history_as_saved(p_idx);
443445
}
444446
emit_signal(SNAME("history_changed"));

0 commit comments

Comments
 (0)