From cab91cf8fb3fa6cb51c5331d5efd03d8d683a1ca Mon Sep 17 00:00:00 2001 From: ajreckof Date: Thu, 5 Sep 2024 21:00:59 +0200 Subject: [PATCH] fix clear button on Array[Node] (cherry picked from commit dee0453b5774cc411d2305aa9210c4589e89f0b2) --- editor/editor_properties.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index fdb4ec170b8..c90222a09f3 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -2778,7 +2778,11 @@ void EditorPropertyNodePath::_update_menu() { void EditorPropertyNodePath::_menu_option(int p_idx) { switch (p_idx) { case ACTION_CLEAR: { - emit_changed(get_edited_property(), NodePath()); + if (editing_node) { + emit_changed(get_edited_property(), Variant()); + } else { + emit_changed(get_edited_property(), NodePath()); + } update_property(); } break;