From 0a77d2d85054039b3b06d051acf5386b5de5c7bd Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Sun, 30 Jan 2022 12:28:44 -0500 Subject: [PATCH] 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. (cherry picked from commit c9cce53983fcf5f00d780d1ec08d0f82f34bf49e) --- editor/plugins/skeleton_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/skeleton_editor_plugin.cpp b/editor/plugins/skeleton_editor_plugin.cpp index 58f9f30a8c4..acf421e3115 100644 --- a/editor/plugins/skeleton_editor_plugin.cpp +++ b/editor/plugins/skeleton_editor_plugin.cpp @@ -77,7 +77,7 @@ void SkeletonEditor::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);