elm_list.c: Added a real support for ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL for...
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Tue, 5 Nov 2013 05:17:15 +0000 (14:17 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Tue, 5 Nov 2013 05:18:54 +0000 (14:18 +0900)
This was missed in a8efd7676eb95378355f4d603ddff938279703af.

legacy/elementary/src/lib/elm_list.c

index 4a4107c..fef56cf 100644 (file)
@@ -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