diff options
author | Leonardo Loch <leonardoloch@expertisesolutions.com.br> | 2018-12-06 14:28:41 -0200 |
---|---|---|
committer | Vitor Sousa <vitorsousa@expertisesolutions.com.br> | 2018-12-07 14:01:13 -0200 |
commit | 55854e9582ac2fdd6bf6a8a142668ee1c8cbded8 (patch) | |
tree | a113673c8480fa37a1b0b0290f4a612ab091ac6b | |
parent | 9c1d2fe62f96771b0505613108459390f33e5074 (diff) |
elementery: fix mouse selection of items in efl.ui.list_view
-rw-r--r-- | src/lib/elementary/efl_ui_list_view.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_list_view.c b/src/lib/elementary/efl_ui_list_view.c index a4b74ab1c0..6f283f4f22 100644 --- a/src/lib/elementary/efl_ui_list_view.c +++ b/src/lib/elementary/efl_ui_list_view.c | |||
@@ -159,11 +159,21 @@ _on_item_mouse_up(void *data, Evas *evas EINA_UNUSED, Evas_Object *o EINA_UNUSED | |||
159 | { | 159 | { |
160 | Evas_Event_Mouse_Down *ev = event_info; | 160 | Evas_Event_Mouse_Down *ev = event_info; |
161 | Efl_Ui_List_View_Layout_Item *item = data; | 161 | Efl_Ui_List_View_Layout_Item *item = data; |
162 | Eina_Value *v; | ||
163 | Eina_Bool select; | ||
162 | 164 | ||
163 | if (ev->button != 1) return; | 165 | if (ev->button != 1) return; |
164 | if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; | 166 | if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; |
165 | 167 | ||
166 | _efl_ui_list_view_item_select_set(item, EINA_TRUE); | 168 | v = efl_model_property_get(item->children, SELECTED_PROP); |
169 | if (!eina_value_get(v, &select)) | ||
170 | { | ||
171 | WRN("Could not get the select value"); | ||
172 | eina_value_free(v); | ||
173 | return; | ||
174 | } | ||
175 | _efl_ui_list_view_item_select_set(item, !select); | ||
176 | eina_value_free(v); | ||
167 | } | 177 | } |
168 | 178 | ||
169 | EOLIAN static void | 179 | EOLIAN static void |