diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-11-18 08:58:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 08:58:01 +0100 |
commit | bfed10185a55004b258eaad7fbb3e6049448edf9 (patch) | |
tree | 77fd0b159429345cba62cc4222fdf67aefef464d /editor/scene_tree_dock.cpp | |
parent | 2ed7b8d5b6a72eb54235533e3cc7fedddb184ded (diff) | |
parent | 3629651ef85b258d942ed90504fe1092b0e24a4f (diff) |
Merge pull request #43630 from mbrlabs/nodepath-fix-2
Fixed deletion of nodes with exported node paths
Diffstat (limited to 'editor/scene_tree_dock.cpp')
-rw-r--r-- | editor/scene_tree_dock.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index a569db7a1b..ec225c3c38 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -1348,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); |