Fix right clicking sub nodes after renaming parent

(cherry picked from commit f25a698f80)
This commit is contained in:
mujpao 2021-09-23 00:19:21 -07:00 committed by Rémi Verschelde
parent e7b67fe8ee
commit 64d70d28d4
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -541,7 +541,7 @@ void SceneTreeEditor::_node_removed(Node *p_node) {
}
void SceneTreeEditor::_node_renamed(Node *p_node) {
if (!get_scene_node()->is_a_parent_of(p_node)) {
if (p_node != get_scene_node() && !get_scene_node()->is_a_parent_of(p_node)) {
return;
}