genlist: fixed wrong item focus set on item_focus_set API call.
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Mon, 26 May 2014 12:56:10 +0000 (21:56 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Mon, 26 May 2014 13:08:13 +0000 (22:08 +0900)
commit7357290056f2f9acb1aedbfddeea7ef3c5d10260
treeb9ff10c85ee55e5fa1e0a0adeec6fde24638bc82
parentd9f0509b5ef1180eb76c36c642451231c51539ca
genlist: fixed wrong item focus set on item_focus_set API call.

Reset the last_focused_item on _item_focus_set_hook.
This fixes the issue which sets the focus to the wrong item when the
focus is set by an API.

Reproduction step:
elementary_test -> genlist focus -> click an item (not the 2nd item) -> click "Focus 2nd
Item after 1.5 seconds" button.
Focus is not moved to the 2nd item.

@fix
legacy/elementary/src/lib/elm_gengrid.c
legacy/elementary/src/lib/elm_genlist.c
legacy/elementary/src/lib/elm_list.c
legacy/elementary/src/lib/elm_toolbar.c