fixed bug (N_SE-41321)
authorChulheon <ch.jeong47@samsung.com>
Mon, 17 Jun 2013 05:27:02 +0000 (14:27 +0900)
committerChulheon <ch.jeong47@samsung.com>
Mon, 17 Jun 2013 05:27:02 +0000 (14:27 +0900)
Change-Id: Ibeb13655d2befd27c500ec045ea82d895eff83ad

src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp

index 1dcab12..cd45d97 100644 (file)
@@ -1259,7 +1259,7 @@ _EditCopyPasteHandler::OnTouchMoved(const _Control& source, const _TouchInfo& to
        int totalLine = pTextObject->GetTotalLineCount();
 
        float totalHeight = pTextObject->GetTotalHeightF();
-       float frstDisplayY = pTextObject->GetFirstDisplayPositionYF();
+       float firstDisplayY = pTextObject->GetFirstDisplayPositionYF();
        FloatRectangle absTextObjectBounds(0.0f, 0.0f, 0.0f, 0.0f);
        FloatRectangle textObjectBounds = pEditPresenter->GetTextBoundsF();
        FloatRectangle absEditBounds = pEdit->GetAbsoluteBoundsF();
@@ -1291,10 +1291,10 @@ _EditCopyPasteHandler::OnTouchMoved(const _Control& source, const _TouchInfo& to
                pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, absCursorRect);                        
        }
 
-       if (absTextObjectBounds.height > (totalHeight - frstDisplayY))
+       if (absTextObjectBounds.height > (totalHeight - firstDisplayY))
        {
-               absTextObjectBounds.height = totalHeight - frstDisplayY;
-               absTextObjectBounds.y += absCursorRect.height;
+               absTextObjectBounds.height = totalHeight - firstDisplayY;
+               absTextObjectBounds.y += absCursorRect.height/2.0f;
                if (absTextObjectBounds.y > absoluteTouchMovedPoint.y || (absTextObjectBounds.y + absTextObjectBounds.height) < absoluteTouchMovedPoint.y)
                {
                        needToFixYPosition = true;
@@ -1302,12 +1302,12 @@ _EditCopyPasteHandler::OnTouchMoved(const _Control& source, const _TouchInfo& to
        }
        else
        {
-               absTextObjectBounds.y += absCursorRect.height;
-               if (frstDisplayY == 0.0f && absTextObjectBounds.y > absoluteTouchMovedPoint.y)
+               absTextObjectBounds.y += absCursorRect.height/2.0f;
+               if (firstDisplayY == 0.0f && absTextObjectBounds.y > absoluteTouchMovedPoint.y)
                {
                        needToFixYPosition = true;
                }
-               else if ((totalHeight - frstDisplayY) == absTextObjectBounds.height && (absTextObjectBounds.y + absTextObjectBounds.height) < absoluteTouchMovedPoint.y)
+               else if ((totalHeight - firstDisplayY) == absTextObjectBounds.height && (absTextObjectBounds.y + absTextObjectBounds.height) < absoluteTouchMovedPoint.y)
                {
                        needToFixYPosition = true;
                }
@@ -2098,6 +2098,12 @@ _EditCopyPasteManager::CreateCopyPastePopup(void)
                __pEdit->CalculateAbsoluteCursorBounds(cursorPosition, cursorRect);
                copyPastePoint.x = cursorRect.x;
                copyPastePoint.y = cursorRect.y;
+
+               if (__editVisibleArea.y > copyPastePoint.y || __editVisibleArea.y + __editVisibleArea.height < copyPastePoint.y)
+               {
+                       return;
+               }
+
                if (copyPastePoint.y < __contextMenuHeight)
                {
                        FloatRectangle cursorRect = GetCursorBoundsF(true);