From 827535158d9c1513e4532f367e4fc31c01f2d006 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Tue, 5 Nov 2013 14:17:15 +0900 Subject: [PATCH] elm_list.c: Added a real support for ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL for list. This was missed in a8efd7676eb95378355f4d603ddff938279703af. --- legacy/elementary/src/lib/elm_list.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/legacy/elementary/src/lib/elm_list.c b/legacy/elementary/src/lib/elm_list.c index 4a4107c..fef56cf 100644 --- a/legacy/elementary/src/lib/elm_list.c +++ b/legacy/elementary/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 -- 2.7.4