summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
authorajreckof <tbonhoure@ymail.com>2024-08-10 19:33:59 +0200
committerajreckof <tbonhoure@ymail.com>2024-08-10 23:25:46 +0200
commit6577a39bd00f29136309c67f9fc3ea77e163ee61 (patch)
treeef2df246acf80dddbeafd71c88755a152e25f786 /editor
parent3978628c6cc1227250fc6ed45c8d854d24c30c30 (diff)
downloadredot-engine-6577a39bd00f29136309c67f9fc3ea77e163ee61.tar.gz
Fix label update for dict on item deletion.
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_properties_array_dict.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index c6fb323f1a..9aa2390230 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -907,6 +907,8 @@ void EditorPropertyDictionary::_add_key_value() {
VariantInternal::initialize(&new_value, type);
object->set_new_item_value(new_value);
+ object->set_dict(dict);
+ slots[(dict.size() - 1) % page_length].update_prop_or_index();
emit_changed(get_edited_property(), dict);
}
@@ -960,6 +962,10 @@ void EditorPropertyDictionary::_change_type_menu(int p_index) {
dict[key] = value;
} else {
dict.erase(key);
+ object->set_dict(dict);
+ for (Slot &slot : slots) {
+ slot.update_prop_or_index();
+ }
}
emit_changed(get_edited_property(), dict);