diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-06-23 14:03:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-23 14:03:40 +0200 |
commit | 49d061f8fc39c35a175d098d083558c93769010c (patch) | |
tree | 7cf22f30e5759866c79d9c9b077c4919f998e8c6 /scene/main | |
parent | cac4e39ad293ed8af2d14f367ad5590ece76ff07 (diff) | |
parent | d69e3791bf41dca6c29a9eb24bb92648cce2d692 (diff) |
Merge pull request #62335 from reduz/fix-editor-only-visibility
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/node.cpp | 5 | ||||
-rw-r--r-- | scene/main/node.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index b5caec3fc3..a30eb036db 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -420,6 +420,9 @@ void Node::move_child_notify(Node *p_child) { // to be used when not wanted } +void Node::owner_changed_notify() { +} + void Node::set_physics_process(bool p_process) { if (data.physics_process == p_process) { return; @@ -1544,6 +1547,8 @@ void Node::_set_owner_nocheck(Node *p_owner) { data.owner = p_owner; data.owner->data.owned.push_back(this); data.OW = data.owner->data.owned.back(); + + owner_changed_notify(); } void Node::_release_unique_name_in_owner() { diff --git a/scene/main/node.h b/scene/main/node.h index 8de6c1ce69..5b7bc0a587 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -208,6 +208,7 @@ protected: virtual void add_child_notify(Node *p_child); virtual void remove_child_notify(Node *p_child); virtual void move_child_notify(Node *p_child); + virtual void owner_changed_notify(); void _propagate_replace_owner(Node *p_owner, Node *p_by_owner); |