summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Roden-Corrent <ryan@rcorre.net>2022-01-30 12:28:44 -0500
committerRyan Roden-Corrent <ryan@rcorre.net>2022-01-30 12:28:44 -0500
commitc9cce53983fcf5f00d780d1ec08d0f82f34bf49e (patch)
tree0678e3efdb6b384a46d293c1133871e40dfd17c1
parent78e3e65e7c38d18128524e0822a106ac76e38800 (diff)
Merge create_physical_skeleton undo entries.
Pressing `ctrl+z` after clicking "Create Physical Skeleton" will now undo the creation of all physical bones by that operation. Previously undo would remove one bone at a time. Fixes https://github.com/godotengine/godot/issues/55351.
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp
index 169ce29438..5dd24983ff 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_3d_editor_plugin.cpp
@@ -383,7 +383,7 @@ void Skeleton3DEditor::create_physical_skeleton() {
if (!bones_infos[parent].physical_bone) {
bones_infos.write[parent].physical_bone = create_physical_bone(parent, bone_id, bones_infos);
- ur->create_action(TTR("Create physical bones"));
+ ur->create_action(TTR("Create physical bones"), UndoRedo::MERGE_ALL);
ur->add_do_method(skeleton, "add_child", bones_infos[parent].physical_bone);
ur->add_do_reference(bones_infos[parent].physical_bone);
ur->add_undo_method(skeleton, "remove_child", bones_infos[parent].physical_bone);