multibuttonentry: Item selected callback called twice redundantly.
authorwoochan lee <wc0917.lee@samsung.com>
Sat, 14 Feb 2015 13:56:05 +0000 (22:56 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Sat, 14 Feb 2015 13:56:05 +0000 (22:56 +0900)
Summary:
_current_item_change() called at _item_select() internally.
it means _current_item_changed() called two times in vain.
so that's why item select callback called two times.
@fix

Test Plan:
1. Run elementary_test
2. Excute multibuttonentry sample.
3. Added some items and click the item area.
4. Select signal called two times.

Reviewers: Hermet, woohyun, JackDanielZ, seoz

Reviewed By: seoz

Differential Revision: https://phab.enlightenment.org/D1955

src/lib/elc_multibuttonentry.c

index d68dcee..51491db 100644 (file)
@@ -481,16 +481,10 @@ _on_item_clicked(void *data,
    if (sd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK)
      return;
 
-   _current_item_change(WIDGET(it), eo_it);
+   _item_select(WIDGET(it), it);
 
    if (sd->selected_it)
-     {
-        if ((it = sd->selected_it) != NULL)
-          {
-             evas_object_smart_callback_call(VIEW(it), SIG_ITEM_CLICKED, eo_it);
-             _item_select(WIDGET(it), it);
-          }
-     }
+     evas_object_smart_callback_call(VIEW(it), SIG_ITEM_CLICKED, eo_it);
 }
 
 static void