forked from enlightenment/efl
Toolbar: fix retrieval of previous state
There should be no problem that the prev_state is the first state. The last state should be returned only if there is nothing before the current state. @fix
This commit is contained in:
parent
4e828b4f13
commit
7957041d84
|
@ -3818,7 +3818,7 @@ _elm_toolbar_item_state_prev(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *ite
|
|||
if (!item->states) return NULL;
|
||||
|
||||
prev_state = eina_list_prev(item->current_state);
|
||||
if ((!prev_state) || (prev_state == item->states))
|
||||
if (!prev_state)
|
||||
prev_state = eina_list_last(item->states);
|
||||
return eina_list_data_get(prev_state);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue