Parcourir la source

fix clear button on Array[Node]

(cherry picked from commit dee0453b5774cc411d2305aa9210c4589e89f0b2)
ajreckof il y a 1 an
Parent
commit
cab91cf8fb
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      editor/editor_properties.cpp

+ 5 - 1
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;