summaryrefslogtreecommitdiffstats
path: root/editor/editor_properties.cpp
diff options
context:
space:
mode:
authorajreckof <tbonhoure@ymail.com>2024-09-05 21:00:59 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-09-17 08:57:44 +0200
commitcab91cf8fb3fa6cb51c5331d5efd03d8d683a1ca (patch)
tree2da071724622fa3a69901de51ba1d2c3f8ad08ff /editor/editor_properties.cpp
parent0b815cbb99173e7eefb4448615805ab365d991e8 (diff)
downloadredot-engine-cab91cf8fb3fa6cb51c5331d5efd03d8d683a1ca.tar.gz
fix clear button on Array[Node]
(cherry picked from commit dee0453b5774cc411d2305aa9210c4589e89f0b2)
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r--editor/editor_properties.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index fdb4ec170b..c90222a09f 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;