summaryrefslogtreecommitdiff
path: root/tools/editor/property_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/property_editor.cpp')
-rw-r--r--tools/editor/property_editor.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp
index 9fb623022b..c44cfa3d6e 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -915,15 +915,25 @@ void CustomPropertyEditor::_color_changed(const Color& p_color) {
void CustomPropertyEditor::_node_path_selected(NodePath p_path) {
- if (owner && owner->is_type("Node")) {
+ if (owner) {
+
+ Node *node=NULL;
+
+ if (owner->is_type("Node"))
+ node = owner->cast_to<Node>();
+ else if (owner->is_type("ArrayPropertyEdit"))
+ node = owner->cast_to<ArrayPropertyEdit>()->get_node();
+
+ if (!node) {
+ v=p_path;
+ emit_signal("variant_changed");
+ return;
+ }
- Node *node = owner->cast_to<Node>();
Node *tonode=node->get_node(p_path);
if (tonode) {
-
p_path=node->get_path_to(tonode);
}
-
}
v=p_path;