Explorar o código

fix clear button on Array[Node]

ajreckof hai 1 ano
pai
achega
dee0453b57
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      editor/editor_properties.cpp

+ 5 - 1
editor/editor_properties.cpp

@@ -2703,7 +2703,11 @@ void EditorPropertyNodePath::_update_menu() {
 void EditorPropertyNodePath::_menu_option(int p_idx) {
 void EditorPropertyNodePath::_menu_option(int p_idx) {
 	switch (p_idx) {
 	switch (p_idx) {
 		case ACTION_CLEAR: {
 		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();
 			update_property();
 		} break;
 		} break;