From e8eb151a2afffb49a38c1a42f5321d2549399e84 Mon Sep 17 00:00:00 2001 From: Tae-Hwan Kim Date: Sun, 5 May 2013 00:44:54 +0900 Subject: [PATCH] [Genlist] Set focused object as NULL when item is deleted or genlist is cleared. Change-Id: I19bb5a96c23156a993c63ed361a831971940006e --- src/lib/elm_genlist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index dc3e1f0..8b50bb1 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -5215,6 +5215,7 @@ _item_free(Elm_Gen_Item *it) { Elm_Genlist_Smart_Data *sd = GL_IT(it)->wsd; + if (sd->focused == it) sd->focused = NULL; elm_widget_item_pre_notify_del(it); if (it->itc->func.del) it->itc->func.del((void *)it->base.data, WIDGET(it)); @@ -5769,6 +5770,7 @@ elm_genlist_clear(Evas_Object *obj) ELM_GENLIST_DATA_GET(obj, sd); Elm_Gen_Item *it; + sd->focused = NULL; if (sd->state) { eina_inlist_sorted_state_free(sd->state); -- 2.7.4