Set correct saved history after clearing

(cherry picked from commit ea452f2de5)
This commit is contained in:
kobewi 2025-10-01 22:27:27 +02:00 committed by Rémi Verschelde
parent f12cc7a014
commit 90d1d9e957
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -438,7 +438,9 @@ void EditorUndoRedoManager::clear_history(int p_idx, bool p_increase_version) {
history.undo_stack.clear();
history.redo_stack.clear();
if (!p_increase_version) {
if (p_increase_version) {
history.saved_version = 0;
} else {
set_history_as_saved(p_idx);
}
emit_signal(SNAME("history_changed"));