浏览代码

fix paste value not updated in dictionaries/arrays

ajreckof 2 年之前
父节点
当前提交
6f596ee903
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      editor/editor_properties_array_dict.cpp

+ 6 - 0
editor/editor_properties_array_dict.cpp

@@ -218,6 +218,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) {
@@ -748,6 +751,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) {