summaryrefslogtreecommitdiffstats
path: root/editor/editor_properties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r--editor/editor_properties.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index b7380c9fc2..ea364d8a0d 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -2159,7 +2159,7 @@ EditorPropertyQuaternion::EditorPropertyQuaternion() {
warning_dialog->set_text(TTR("Temporary Euler will not be stored in the object with the original value. Instead, it will be stored as Quaternion with irreversible conversion.\nThis is due to the fact that the result of Euler->Quaternion can be determined uniquely, but the result of Quaternion->Euler can be multi-existent."));
euler_label = memnew(Label);
- euler_label->set_text("Temporary Euler");
+ euler_label->set_text(TTR("Temporary Euler"));
edit_custom_bc->add_child(warning);
edit_custom_bc->add_child(edit_custom_layout);
@@ -2751,7 +2751,16 @@ void EditorPropertyNodePath::_node_assign() {
add_child(scene_tree);
scene_tree->connect("selected", callable_mp(this, &EditorPropertyNodePath::_node_selected));
}
- scene_tree->popup_scenetree_dialog();
+
+ Variant val = get_edited_property_value();
+ Node *n = nullptr;
+ if (val.get_type() == Variant::Type::NODE_PATH) {
+ Node *base_node = get_base_node();
+ n = base_node == nullptr ? nullptr : base_node->get_node_or_null(val);
+ } else {
+ n = Object::cast_to<Node>(val);
+ }
+ scene_tree->popup_scenetree_dialog(n, get_base_node());
}
void EditorPropertyNodePath::_update_menu() {
@@ -3184,7 +3193,6 @@ void EditorPropertyResource::_resource_changed(const Ref<Resource> &p_resource)
add_child(scene_tree);
scene_tree->connect("selected", callable_mp(this, &EditorPropertyResource::_viewport_selected));
}
-
scene_tree->popup_scenetree_dialog();
}
}