Bug fix for calculating drawing line and Modify for N-SE_34088
authorwonyoung12.lee <wonyoung12.lee@samsung.com>
Thu, 11 Apr 2013 10:56:34 +0000 (19:56 +0900)
committerwonyoung12.lee <wonyoung12.lee@samsung.com>
Fri, 12 Apr 2013 10:53:30 +0000 (19:53 +0900)
Change-Id: Iebed4f2433b227ff35a451f65cc1ee496a88d6d3
Signed-off-by: wonyoung12.lee <wonyoung12.lee@samsung.com>
src/ui/controls/FUiCtrl_IconListPresenter.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index dec381d..69b21fd
@@ -1661,8 +1661,7 @@ _IconListPresenter::DrawHorizontalScrollList(void)
        float itemHeight = GetItemSize().height;
        float itemWidth = GetItemSize().width;
        FloatRectangle itemRect(0.0f, 0.0f, itemWidth, itemHeight);
-       int drawingLine = !_FloatCompareGE(__scrollPosition, __leftMargin) ?
-                       static_cast<int> ((__scrollPosition - __leftMargin + __horizontalSpacing) / __unitScrollLength) : 0;
+       int drawingLine = __scrollPosition > __leftMargin ? _CoordinateSystemUtils::ConvertToInteger((__scrollPosition - __leftMargin + __horizontalSpacing) / __unitScrollLength) : 0;
        int index = drawingLine * __itemCountPerAxis;
        float endXPos = __pIconListView->GetBounds().width;
        float endYPos = __endPosOfAxis;
@@ -1707,10 +1706,10 @@ _IconListPresenter::DrawHorizontalScrollList(void)
        // Draw Items
        _IconListItem* pItem = null;
        __firstDrawnIndex = index;
-       while (!_FloatCompareGE(itemRect.x, endXPos))
+       while (itemRect.x < endXPos)
        {
                itemRect.y = __startPosOfAxis;
-               while (!_FloatCompareGE(itemRect.y, endYPos) && index < itemCount)
+               while (itemRect.y < endYPos && index < itemCount)
                {
                        // Draw Item
                        pItem = dynamic_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, index));
@@ -1759,8 +1758,7 @@ _IconListPresenter::DrawVerticalScrollList(void)
        float itemHeight = GetItemSize().height;
        float itemWidth = GetItemSize().width;
        FloatRectangle itemRect(0.0f, 0.0f, itemWidth, itemHeight);
-       int drawingLine = !_FloatCompareGE(__scrollPosition, __topMargin) ?
-                       static_cast<int> ((__scrollPosition - __topMargin + __verticalSpacing) / __unitScrollLength) : 0;
+       int drawingLine = __scrollPosition > __topMargin ? _CoordinateSystemUtils::ConvertToInteger((__scrollPosition - __topMargin + __verticalSpacing) / __unitScrollLength) : 0;
        int index = drawingLine * __itemCountPerAxis;
        float endXPos = __endPosOfAxis;
        float endYPos = __pIconListView->GetBounds().height;
@@ -1805,10 +1803,10 @@ _IconListPresenter::DrawVerticalScrollList(void)
        // Draw Items
        _IconListItem* pItem = null;
        __firstDrawnIndex = index;
-       while (!_FloatCompareGE(itemRect.y, endYPos))
+       while (itemRect.y < endYPos)
        {
                itemRect.x = __startPosOfAxis;
-               while (!_FloatCompareGE(itemRect.x, endXPos) && index < itemCount)
+               while (itemRect.x < endXPos && index < itemCount)
                {
                        // Draw Item
                        pItem = dynamic_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, index));
@@ -4423,6 +4421,10 @@ _IconListPresenter::StartSelectAnimation(int index)
 
        _IconListItem* pItem = static_cast<_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, index));
        __pSelectAnimationVE = pItem->GetSelectAniVisualElement();
+       if (__pSelectAnimationVE == null)
+       {
+               return;
+       }
        __pSelectAnimationVE->RemoveAllAnimations();
 
        FloatRectangle startFloatRect = __pSelectAnimationVE->GetBounds();