mirror of
https://github.com/godotengine/godot.git
synced 2026-01-01 05:49:28 +03:00
Fix null value when picking the empty item on editable enums
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user