summaryrefslogtreecommitdiff
path: root/editor/scene_tree_dock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/scene_tree_dock.cpp')
-rw-r--r--editor/scene_tree_dock.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index add5047c99..ec225c3c38 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -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) {
@@ -1352,8 +1348,8 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP
break;
}
- // update if the node itself moved up/down the tree hirarchy
- if (root_path == F->get().first) {
+ // update the node itself if it has a valid node path and has not been deleted
+ if (root_path == F->get().first && p != NodePath() && F->get().second != NodePath()) {
NodePath abs_path = NodePath(String(root_path).plus_file(p)).simplified();
NodePath rel_path_new = F->get().second.rel_path_to(abs_path);
@@ -2828,8 +2824,8 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
HBoxContainer *filter_hbc = memnew(HBoxContainer);
filter_hbc->add_theme_constant_override("separate", 0);
- ED_SHORTCUT("scene_tree/rename", TTR("Rename"));
- ED_SHORTCUT("scene_tree/batch_rename", TTR("Batch Rename"), KEY_MASK_CMD | KEY_F2);
+ ED_SHORTCUT("scene_tree/rename", TTR("Rename"), KEY_F2);
+ ED_SHORTCUT("scene_tree/batch_rename", TTR("Batch Rename"), KEY_MASK_SHIFT | KEY_F2);
ED_SHORTCUT("scene_tree/add_child_node", TTR("Add Child Node"), KEY_MASK_CMD | KEY_A);
ED_SHORTCUT("scene_tree/instance_scene", TTR("Instance Child Scene"));
ED_SHORTCUT("scene_tree/expand_collapse_all", TTR("Expand/Collapse All"));