diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp index 14d487a10..285dcc009 100644 --- a/scene/gui/option_button.cpp +++ b/scene/gui/option_button.cpp @@ -260,12 +260,9 @@ int OptionButton::get_selected() const { } int OptionButton::get_selected_id() const { - int idx = get_selected(); - if (idx < 0) { - return 0; - } return get_item_id(current); } + Variant OptionButton::get_selected_metadata() const { int idx = get_selected(); if (idx < 0) {