mirror of https://github.com/godotengine/godot
Fix `null` value when picking the empty item on editable enums
This commit is contained in:
parent
5cb1ec5900
commit
08b511ec8f
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue