elm genlist: Clear last_selected_item when last_selected_item is

deleted.


SVN revision: 64031
This commit is contained in:
Daniel Juyung Seo 2011-10-13 03:47:57 +00:00
parent ec9781ce40
commit b5969dc2a3
1 changed files with 10 additions and 0 deletions

View File

@ -1701,6 +1701,15 @@ _item_label_hook(Elm_Genlist_Item *it, const char *part)
return edje_object_part_text_get(it->base.view, part);
}
static void
_item_del_hook(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
Elm_Genlist_Item *it = event_info;
if (!it) return;
if (it->wd->last_selected_item == it)
it->wd->last_selected_item = NULL;
}
static void
_item_label_realize(Elm_Genlist_Item *it,
Evas_Object *target,
@ -3158,6 +3167,7 @@ _item_new(Widget_Data *wd,
it->mouse_cursor = NULL;
it->expanded_depth = 0;
elm_widget_item_text_get_hook_set(it, _item_label_hook);
elm_widget_item_del_cb_set(it, _item_del_hook);
if (it->parent)
{