mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-25 13:17:22 +01:00
Return -1 from get_selected_id() when not selected
Partial cherry pick from 3b146c5eaa06d9f6827c651802b9fb2a9a1e013d
This commit is contained in:
parent
e81d1f010a
commit
c819fe68dd
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user