Parcourir la source

Merge pull request #76711 from ajreckof/fix-paste-value-not-updating-element-in-dictionaries/array

Fix paste value not updated in dictionaries/arrays
Rémi Verschelde il y a 2 ans
Parent
commit
e8e00b981e
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      editor/editor_properties_array_dict.cpp

+ 6 - 0
editor/editor_properties_array_dict.cpp

@@ -208,6 +208,9 @@ void EditorPropertyArray::_property_changed(const String &p_property, Variant p_
 	array.set(index, p_value);
 	object->set_array(array);
 	emit_changed(get_edited_property(), array, "", true);
+	if (!p_changing) {
+		update_property();
+	}
 }
 
 void EditorPropertyArray::_change_type(Object *p_button, int p_index) {
@@ -738,6 +741,9 @@ void EditorPropertyDictionary::_property_changed(const String &p_property, Varia
 		object->set_dict(dict);
 		emit_changed(get_edited_property(), dict, "", true);
 	}
+	if (!p_changing) {
+		update_property();
+	}
 }
 
 void EditorPropertyDictionary::_change_type(Object *p_button, int p_index) {