Fix for JIRA N_SE-48330 (stop checkbox animation for undrawn items)
authorkatpaga.a <katpaga.a@samsung.com>
Mon, 5 Aug 2013 11:17:16 +0000 (16:47 +0530)
committerkatpaga.a <katpaga.a@samsung.com>
Mon, 5 Aug 2013 12:11:13 +0000 (17:41 +0530)
Change-Id: I1ee91bcf14a81442731cf0bc2613c3268d526405
Signed-off-by: katpaga.a <katpaga.a@samsung.com>
src/ui/controls/FUiCtrl_TableViewPresenter.cpp

index 1f6fe9e..969432c 100644 (file)
@@ -1248,9 +1248,22 @@ _TableViewPresenter::SetItemChecked(int groupIndex, int itemIndex, bool checked)
 
        TableViewItemTag itemTag = {groupIndex, itemIndex};
        _TableViewItem *pItem = FindItem(itemTag);
+
+       TableViewItemTag topDrawnItemTag = {-1, -1};
+       GetTopDrawnItem(topDrawnItemTag);
+
+       TableViewItemTag bottomDrawnItemTag = {-1, -1};
+       GetBottomDrawnItem(bottomDrawnItemTag);
+
        if (pItem != null)
        {
-               pItem->SetCheckedAnimationEnabled(checked);
+               if (((itemTag.groupIndex == topDrawnItemTag.groupIndex && itemTag.itemIndex >= topDrawnItemTag.itemIndex)
+                || itemTag.groupIndex > topDrawnItemTag.groupIndex) &&
+               ((itemTag.groupIndex == bottomDrawnItemTag.groupIndex && itemTag.itemIndex <= bottomDrawnItemTag.itemIndex)
+                || itemTag.groupIndex < bottomDrawnItemTag.groupIndex))
+               {
+                       pItem->SetCheckedAnimationEnabled(checked);
+               }
        }
 
        result r = __pListModel->SetItemChecked(groupIndex, itemIndex, checked);