IconListView - Fix for N_SE-51665 + N_SE-51673
authorSreedeep Moulik <sreedeep.m@samsung.com>
Tue, 10 Sep 2013 10:37:05 +0000 (16:07 +0530)
committerSreedeep Moulik <sreedeep.m@samsung.com>
Tue, 10 Sep 2013 11:00:34 +0000 (16:30 +0530)
Change-Id: Ib2969d528d966ad338cb2b3907b182ee2de3fab6
Signed-off-by: Sreedeep Moulik <sreedeep.m@samsung.com>
src/ui/controls/FUiCtrl_IconListPresenter.cpp

index 2fe2bab..654d9eb 100644 (file)
@@ -931,7 +931,8 @@ _IconListPresenter::RefreshList(int index, ListRefreshType type)
                SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
 
                __needSetAccessibility = true;
-               RedrawItem(index);
+               RedrawItem(index, __highlightedIndex == index);
+
                return r;
        }
        }
@@ -5209,20 +5210,20 @@ _IconListPresenter::DrawFocusUi(int focusUiIndex)
                __highlightedIndex = lastItemIndex;
        }
 
-       if (!__firstDrawnItemFullyDrawn && (focusUiIndex >= __firstDrawnIndex && focusUiIndex <= __firstDrawnIndex + GetItemCountPerAxis() - 1))
+       if (!__firstDrawnItemFullyDrawn && (__highlightedIndex >= __firstDrawnIndex && __highlightedIndex <= __firstDrawnIndex + GetItemCountPerAxis() - 1))
        {
-               ScrollToItem(focusUiIndex);
+               ScrollToItem(__highlightedIndex);
                __pIconListView->Draw();
        }
-       else if (!__lastDrawnItemFullyDrawn && (__lastDrawnIndex - focusUiIndex <= GetItemCountPerAxis() - 1))
+       else if (!__lastDrawnItemFullyDrawn && (__lastDrawnIndex - __highlightedIndex <= GetItemCountPerAxis() - 1))
        {
-               ScrollToItem(focusUiIndex);
+               ScrollToItem(__highlightedIndex);
                __pIconListView->Draw();
        }
 
-       if (focusUiIndex < __firstDrawnIndex || focusUiIndex > __lastDrawnIndex)
+       if (__highlightedIndex < __firstDrawnIndex || __highlightedIndex > __lastDrawnIndex)
        {
-               ScrollToItem(focusUiIndex);
+               ScrollToItem(__highlightedIndex);
                __pIconListView->Draw();
        }