When the toolbar is deleted, there's no need to pass the selection to next item.

SVN revision: 80008
This commit is contained in:
Jaehwan Kim 2012-12-03 06:52:03 +00:00
parent 4cf133cf15
commit db9aec704d
1 changed files with 8 additions and 4 deletions

View File

@ -1669,12 +1669,16 @@ _item_del_pre_hook(Elm_Object_Item *it)
if (item != sd->more_item) /* more item does not get in the list */ if (item != sd->more_item) /* more item does not get in the list */
{ {
next = ELM_TOOLBAR_ITEM_FROM_INLIST(EINA_INLIST_GET(item)->next); if (!sd->on_deletion)
next = ELM_TOOLBAR_ITEM_FROM_INLIST(EINA_INLIST_GET(item)->next);
sd->items = eina_inlist_remove(sd->items, EINA_INLIST_GET(item)); sd->items = eina_inlist_remove(sd->items, EINA_INLIST_GET(item));
sd->item_count--; sd->item_count--;
if (!next) next = ELM_TOOLBAR_ITEM_FROM_INLIST(sd->items); if (!sd->on_deletion)
if ((sd->select_mode == ELM_OBJECT_SELECT_MODE_ALWAYS) && {
item->selected && next) _item_select(next); if (!next) next = ELM_TOOLBAR_ITEM_FROM_INLIST(sd->items);
if ((sd->select_mode == ELM_OBJECT_SELECT_MODE_ALWAYS) &&
item->selected && next) _item_select(next);
}
} }
_item_del(item); _item_del(item);