summaryrefslogtreecommitdiffstats
path: root/core/object/undo_redo.cpp
diff options
context:
space:
mode:
authorSofox <sofoxx@gmail.com>2023-11-12 14:33:02 +0000
committerSofox <sofoxx@gmail.com>2023-11-12 14:49:51 +0000
commit4006397339c4f9fafcc51f8545651676103ea16f (patch)
tree9d6f7f76afcd875794ad9a8a34f430c256c25569 /core/object/undo_redo.cpp
parent5abeb043d00c523b433cf3c9f6940142a3eeb368 (diff)
downloadredot-engine-4006397339c4f9fafcc51f8545651676103ea16f.tar.gz
Reduced output spam from rapid property changes
Diffstat (limited to 'core/object/undo_redo.cpp')
-rw-r--r--core/object/undo_redo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/object/undo_redo.cpp b/core/object/undo_redo.cpp
index 1d0dff526d..3c1d4ef95e 100644
--- a/core/object/undo_redo.cpp
+++ b/core/object/undo_redo.cpp
@@ -301,6 +301,8 @@ void UndoRedo::commit_action(bool p_execute) {
return; //still nested
}
+ bool add_message = !merging;
+
if (merging) {
version--;
merging = false;
@@ -314,7 +316,7 @@ void UndoRedo::commit_action(bool p_execute) {
_redo(p_execute); // perform action
committing--;
- if (callback && actions.size() > 0) {
+ if (add_message && callback && actions.size() > 0) {
callback(callback_ud, actions[actions.size() - 1].name);
}
}