summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Hilbrunner <mhilbrunner@users.noreply.github.com>2018-05-23 17:47:05 +0200
committerGitHub <noreply@github.com>2018-05-23 17:47:05 +0200
commit65c49643c111ba006f3d564cae0f3c67c7d6f9e7 (patch)
tree501dc28eca4d800d01b63593124c74eeef62a5ba
parentc5946259446afdf046488f6f1d3c63cd281344d5 (diff)
parent70e04ae26f23cb3cef687fa12906c2097549efff (diff)
Merge pull request #19124 from volzhs/relative-node-path
Use relative node path when assigning a node on inspector
-rw-r--r--editor/editor_properties.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 0625aeee54..d1968468f8 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -1522,7 +1522,8 @@ EditorPropertyColor::EditorPropertyColor() {
void EditorPropertyNodePath::_node_selected(const NodePath &p_path) {
- emit_signal("property_changed", get_edited_property(), p_path);
+ Node *base_node = Object::cast_to<Node>(get_edited_object());
+ emit_signal("property_changed", get_edited_property(), base_node->get_path().rel_path_to(p_path));
update_property();
}