[N_SE-37289] If _FastScroll fails to find an selected index in omitted indexes, it...
authorSungHee Kim <sh.victoria.kim@samsung.com>
Wed, 8 May 2013 06:04:32 +0000 (15:04 +0900)
committerSungHee Kim <sh.victoria.kim@samsung.com>
Wed, 8 May 2013 06:10:16 +0000 (15:10 +0900)
Change-Id: I81c942a467f05c7670f2785594b193ab5525ace8
Signed-off-by: SungHee Kim <sh.victoria.kim@samsung.com>
src/ui/controls/FUiCtrl_FastScrollPresenter.cpp

index c624625..9c7f7aa 100644 (file)
@@ -445,7 +445,7 @@ _FastScrollIndexView::GetOmissionIndexAtPoint(_FastScrollIndex* pIndex, const Fl
        float indexHeight = GetIndexHeight() / pIndex->GetChildCount();
        int omissionIndexOrder = 0;
 
-       if (!(_FloatCompare(touchY, 0.0f) || _FloatCompare(indexHeight, 0.0f)))
+       if ((touchY > 0.0f) && !_FloatCompare(indexHeight, 0.0f))
        {
                omissionIndexOrder = _CoordinateSystemUtils::ConvertToInteger(touchY / indexHeight);
        }
@@ -554,6 +554,11 @@ _FastScrollIndexView::GetSelectedIndex(void) const
 void
 _FastScrollIndexView::SetSelectedIndexInOmittedIndex(_FastScrollIndex* pIndex)
 {
+       if (pIndex == __pSelectedIndexInOmittedIndex)
+       {
+               return;
+       }
+
        __pFormerIndex = __pSelectedIndexInOmittedIndex;
        __pSelectedIndexInOmittedIndex = pIndex;
 }
@@ -2703,6 +2708,10 @@ _FastScrollPresenter::SelectOnIndexViews(const FloatPoint& point, bool animation
                        {
                                pSelectedIndex = pFocusedIndexView->GetOmissionIndexAtPoint(pIndex,
                                                                                FloatPoint(pFocusedIndexView->GetIndexBoundsF().x, point.y));
+                               if (pSelectedIndex == null)
+                               {
+                                       pSelectedIndex = pFocusedIndexView->GetSelectedIndexInOmittedIndex();
+                               }
                        }
                        pFocusedIndexView->SetSelectedIndexInOmittedIndex(pSelectedIndex);
 
@@ -2711,6 +2720,10 @@ _FastScrollPresenter::SelectOnIndexViews(const FloatPoint& point, bool animation
                else
                {
                        pSelectedIndex = pFocusedIndexView->GetSelectedIndex();
+                       if (pSelectedIndex && pSelectedIndex->GetOmitted() == true)
+                       {
+                               pSelectedIndex = pFocusedIndexView->GetSelectedIndexInOmittedIndex();
+                       }
                        selectedIndexLevel = __focusedIndexLevel;
                }
        }