1
0
Fork 0

Fix `null` value when picking the empty item on editable enums

This commit is contained in:
Michael Alexsander 2025-12-16 15:38:54 -03:00
parent 5cb1ec5900
commit 08b511ec8f
No known key found for this signature in database
GPG Key ID: A9C91EE110F4EABA
1 changed files with 1 additions and 0 deletions

View File

@ -487,6 +487,7 @@ void EditorPropertyTextEnum::update_property() {
// Add an explicit empty value for clearing the property.
option_button->add_item("", options.size() + 1000);
option_button->set_item_metadata(-1, String());
for (int i = 0; i < options.size(); i++) {
option_button->add_item(option_names[i], i);