[Genlist] skip pan obj coord when height is 0
authorSungtaek Hong <sth253.hong@samsung.com>
Fri, 30 Dec 2016 07:48:54 +0000 (16:48 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 2 Jan 2017 05:37:13 +0000 (14:37 +0900)
 - When genlist is in popup scroller, oh, derived from
   evas_object_geometry_get(), is 0. and calculates wrong y.
   This is a hack to skip when 0 height case.

@tizen_fix

Change-Id: I873caea8f53485b85c257a7f5d72b21b6f97c4e8
Signed-off-by: Sungtaek Hong <sth253.hong@samsung.com>
src/mobile_lib/elm_genlist.c

index 5b8fa06..1856c94 100644 (file)
@@ -2625,12 +2625,22 @@ _elm_genlist_pan_evas_object_smart_calculate(Eo *obj, Elm_Genlist_Pan_Data *psd)
           }
         psd->wsd->expanded_item = NULL;
      }
+   /* TIZEN_ONLY(20161230): skip coord calculation when pan obj height is 0.
    if (psd->wsd->show_item &&
        !psd->wsd->show_item->item->queued &&
        psd->wsd->show_item->item->calc_done &&
        psd->wsd->show_item->item->block->calc_done &&
        psd->wsd->calc_done)
      {
+   */
+   if (psd->wsd->show_item &&
+       !psd->wsd->show_item->item->queued &&
+       psd->wsd->show_item->item->calc_done &&
+       psd->wsd->show_item->item->block->calc_done &&
+       psd->wsd->calc_done &&
+       (oh > 0))
+     {
+   /*   END   */
         Evas_Coord x, y;
         Elm_Gen_Item *it = psd->wsd->show_item;
         psd->wsd->show_item = NULL;