Skip to content

Commit cd3c86d

Browse files
committed
Merge pull request #90047 from ajreckof/fix-editing-exported-nodes-in-array-as-text
Fix editing exported nodes in array as text.
2 parents 814187d + ab30c68 commit cd3c86d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

editor/editor_properties.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2648,7 +2648,7 @@ Variant EditorPropertyNodePath::_get_cache_value(const StringName &p_prop, bool
26482648
return Variant();
26492649
}
26502650

2651-
void EditorPropertyNodePath::_node_selected(const NodePath &p_path) {
2651+
void EditorPropertyNodePath::_node_selected(const NodePath &p_path, bool p_absolute) {
26522652
NodePath path = p_path;
26532653
Node *base_node = get_base_node();
26542654

@@ -2658,7 +2658,7 @@ void EditorPropertyNodePath::_node_selected(const NodePath &p_path) {
26582658
path = get_tree()->get_edited_scene_root()->get_path_to(to_node);
26592659
}
26602660

2661-
if (base_node) { // for AnimationTrackKeyEdit
2661+
if (p_absolute && base_node) { // for AnimationTrackKeyEdit
26622662
path = base_node->get_path().rel_path_to(p_path);
26632663
}
26642664

@@ -2680,7 +2680,7 @@ void EditorPropertyNodePath::_node_assign() {
26802680
scene_tree->get_scene_tree()->set_show_enabled_subscene(true);
26812681
scene_tree->set_valid_types(valid_types);
26822682
add_child(scene_tree);
2683-
scene_tree->connect("selected", callable_mp(this, &EditorPropertyNodePath::_node_selected));
2683+
scene_tree->connect("selected", callable_mp(this, &EditorPropertyNodePath::_node_selected).bind(true));
26842684
}
26852685

26862686
Variant val = get_edited_property_value();
@@ -2748,7 +2748,7 @@ void EditorPropertyNodePath::_accept_text() {
27482748

27492749
void EditorPropertyNodePath::_text_submitted(const String &p_text) {
27502750
NodePath np = p_text;
2751-
emit_changed(get_edited_property(), np);
2751+
_node_selected(np, false);
27522752
edit->hide();
27532753
assign->show();
27542754
menu->show();

editor/editor_properties.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ class EditorPropertyNodePath : public EditorProperty {
628628
bool editing_node = false;
629629

630630
Vector<StringName> valid_types;
631-
void _node_selected(const NodePath &p_path);
631+
void _node_selected(const NodePath &p_path, bool p_absolute = true);
632632
void _node_assign();
633633
Node *get_base_node();
634634
void _update_menu();

0 commit comments

Comments
 (0)