diff options
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 993e281797..f317c23b83 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2136,6 +2136,13 @@ void EditorNode::edit_item(Object *p_object, Object *p_editing_owner) { } } +void EditorNode::push_node_item(Node *p_node) { + if (p_node || Object::cast_to<Node>(InspectorDock::get_inspector_singleton()->get_edited_object())) { + // Don't push null if the currently edited object is not a Node. + push_item(p_node); + } +} + void EditorNode::push_item(Object *p_object, const String &p_property, bool p_inspector_only) { if (!p_object) { InspectorDock::get_inspector_singleton()->edit(nullptr); |