From: Daniel Juyung Seo Date: Tue, 5 Nov 2013 05:17:15 +0000 (+0900) Subject: elm_list.c: Added a real support for ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL for... X-Git-Tag: v1.8.0-alpha2~112 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b0244d1285c76be7f5f003c75e944a6753092422;p=platform%2Fupstream%2Felementary.git elm_list.c: Added a real support for ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL for list. This was missed in a8efd7676eb95378355f4d603ddff938279703af. --- diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c index 4a4107c..fef56cf 100644 --- a/src/lib/elm_list.c +++ b/src/lib/elm_list.c @@ -1296,15 +1296,25 @@ _mouse_up_cb(void *data, if (sd->multi) { - if (!it->selected) + if (((sd->multi_select_mode != ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL) || + (evas_key_modifier_is_set(ev->modifiers, "Control")))) { - _item_highlight(it); - _item_select(it); + if (!it->selected) + { + _item_highlight(it); + _item_select(it); + } + else + { + _item_unhighlight(it); + _item_unselect(it); + } } else { _item_unhighlight(it); - _item_unselect(it); + if (it->selected) + _item_unselect(it); } } else