aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/property_editor.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2015-12-14 10:25:19 -0300
committerJuan Linietsky2015-12-14 10:25:19 -0300
commit4713bcccf3de5f8e0f577f29a67f38bfb8a99b57 (patch)
treefa79263ca3cd17786086f3c9a93f40270abb73a5 /tools/editor/property_editor.cpp
parent83e0e97214a4fad635e5992bbbbd413642d76436 (diff)
parentc262becd7bb87fc17e5a4d3b737c13682855da1a (diff)
downloadgodot-4713bcccf3de5f8e0f577f29a67f38bfb8a99b57.tar.gz
godot-4713bcccf3de5f8e0f577f29a67f38bfb8a99b57.tar.zst
godot-4713bcccf3de5f8e0f577f29a67f38bfb8a99b57.zip
Merge branch 'master' of https://github.com/godotengine/godot
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 9fb623022..c44cfa3d6 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;