diff options
Diffstat (limited to 'editor/scene_tree_dock.cpp')
-rw-r--r-- | editor/scene_tree_dock.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index fa2270dcd6..038b18a648 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -30,10 +30,10 @@ #include "scene_tree_dock.h" +#include "core/config/project_settings.h" #include "core/input/input.h" #include "core/io/resource_saver.h" #include "core/os/keyboard.h" -#include "core/project_settings.h" #include "editor/debugger/editor_debugger_node.h" #include "editor/editor_feature_profile.h" #include "editor/editor_node.h" @@ -1270,10 +1270,6 @@ void SceneTreeDock::_fill_path_renames(Vector<StringName> base_path, Vector<Stri } void SceneTreeDock::fill_path_renames(Node *p_node, Node *p_new_parent, List<Pair<NodePath, NodePath>> *p_renames) { - if (!bool(EDITOR_DEF("editors/animation/autorename_animation_tracks", true))) { - return; - } - Vector<StringName> base_path; Node *n = p_node->get_parent(); while (n) { @@ -1762,6 +1758,8 @@ void SceneTreeDock::_script_created(Ref<Script> p_script) { void SceneTreeDock::_script_creation_closed() { script_create_dialog->disconnect("script_created", callable_mp(this, &SceneTreeDock::_script_created)); + script_create_dialog->disconnect("confirmed", callable_mp(this, &SceneTreeDock::_script_creation_closed)); + script_create_dialog->disconnect("cancelled", callable_mp(this, &SceneTreeDock::_script_creation_closed)); } void SceneTreeDock::_toggle_editable_children_from_selection() { @@ -2107,8 +2105,12 @@ void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node, bool p_keep_prop } if (E->get().name == "__meta__") { - if (Object::cast_to<CanvasItem>(newnode)) { - Dictionary metadata = n->get(E->get().name); + Dictionary metadata = n->get(E->get().name); + if (metadata.has("_editor_description_")) { + newnode->set_meta("_editor_description_", metadata["_editor_description_"]); + } + + if (Object::cast_to<CanvasItem>(newnode) || Object::cast_to<Node3D>(newnode)) { if (metadata.has("_edit_group_") && metadata["_edit_group_"]) { newnode->set_meta("_edit_group_", true); } @@ -2647,7 +2649,8 @@ void SceneTreeDock::attach_script_to_selected(bool p_extend) { } script_create_dialog->connect("script_created", callable_mp(this, &SceneTreeDock::_script_created)); - script_create_dialog->connect("popup_hide", callable_mp(this, &SceneTreeDock::_script_creation_closed), varray(), CONNECT_ONESHOT); + script_create_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_script_creation_closed)); + script_create_dialog->connect("cancelled", callable_mp(this, &SceneTreeDock::_script_creation_closed)); script_create_dialog->set_inheritance_base_type("Node"); script_create_dialog->config(inherits, path); script_create_dialog->popup_centered(); |