[Genlist] Fix genlist unrealization problem
authorTae-Hwan Kim <the81.kim@samsung.com>
Fri, 3 May 2013 06:47:11 +0000 (15:47 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Wed, 12 Jun 2013 04:49:49 +0000 (13:49 +0900)
1. Check visible in viewport
2. If visible, realize it. If not, unrealize it

Change-Id: I2860f9d67230a64742ecf68fe7c1f685369c19d5

src/lib/elm_genlist.c

index a39f995..54a71a1 100644 (file)
@@ -1977,15 +1977,12 @@ _item_block_position(Item_Block *itb,
         it->item->scrl_x = itb->x + it->x - GL_IT(it)->wsd->pan_x + ox;
         it->item->scrl_y = itb->y + it->y - GL_IT(it)->wsd->pan_y + oy;
 
-        if ((itb->realized) && (!it->realized))
-          {
-             if ((ELM_RECTS_INTERSECT
-                  (it->item->scrl_x, it->item->scrl_y, it->item->w, it->item->h,
-                   cvx, cvy, cvw, cvh)))
-               _item_realize(it, in, EINA_FALSE);
-          }
-        if (it->realized)
+        if ((ELM_RECTS_INTERSECT
+             (it->item->scrl_x, it->item->scrl_y, it->item->w, it->item->h,
+              cvx, cvy, cvw, cvh)))
           {
+             if (itb->realized && !(it->realized))
+                _item_realize(it, in, EINA_FALSE);
 #if GENLIST_ENTRY_SUPPORT
              evas_object_show(VIEW(it));
 #endif
@@ -2046,7 +2043,7 @@ _item_block_position(Item_Block *itb,
 #endif
                }
           }
-        else
+        else if (it->realized && !(it->dragging))
           {
              if ((GL_IT(it)->wsd->pinch_zoom_mode == ELM_GEN_PINCH_ZOOM_CONTRACT)
                  && (!IS_ROOT_PARENT_IT(it)))