fixed bug [N_SE-32922][N_SE-32979]
authorChulheon <ch.jeong47@samsung.com>
Mon, 8 Apr 2013 13:15:14 +0000 (22:15 +0900)
committerChulheon <ch.jeong47@samsung.com>
Mon, 8 Apr 2013 13:22:11 +0000 (22:22 +0900)
Change-Id: I34f57a2539a5cec77b40e25481c1ad0bf5b58e70

src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp

index a6f5d0a..3c9cbbd 100755 (executable)
@@ -271,7 +271,7 @@ _EditCopyPasteMagnifier::CaptureTextArea(Canvas& canvas)
                captureBounds.width = textVisualElementBounds.width - captureBounds.x;
        }
 
-       captureBounds.y = cursorBounds.y;
+       captureBounds.y = cursorBounds.y + cursorBounds.height/2 - captureHeight/2;
        if (cursorBounds.y <=  textVisualElementBounds.height - captureHeight)
        {
                captureBounds.height = captureHeight;
@@ -1137,6 +1137,8 @@ _EditCopyPasteHandler::OnTouchMoved(const _Control& source, const _TouchInfo& to
                        }
                        if (point.y < 0.0f || (point.y > GetBoundsF().height))
                        {
+                               __pCopyPasteManager->SetCursorPosition(previousCursorPos);
+                               pEditPresenter->SetCursorChangedFlag(!__leftHandler);
                                return true;
                        }
                }
@@ -1197,7 +1199,6 @@ _EditCopyPasteHandler::OnTouchMoved(const _Control& source, const _TouchInfo& to
 
        pTextObject->SetFirstDisplayLineIndexFromTextIndex(cursorPos);
 
-       __pCopyPasteManager->SetCursorPosition(cursorPos);
        __handlerCursorPos = cursorPos;
        if (!__singleHandler)
        {
@@ -1205,6 +1206,7 @@ _EditCopyPasteHandler::OnTouchMoved(const _Control& source, const _TouchInfo& to
        }
        else
        {
+               __pCopyPasteManager->SetCursorPosition(cursorPos);
                pEditPresenter->DrawText();
                AdjustBounds();
        }
@@ -1514,7 +1516,7 @@ _EditCopyPasteManager::CreateCopyPastePopup(void)
        GET_SHAPE_CONFIG(CONTEXTMENU::GRID_BOTTOM_MARGIN, orientation, contextMenuBottomMargin);
        GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_HEIGHT, orientation, contextMenuArrowHeight);
 
-       if ( __pEdit->GetTextLength() == 0 && !__pEdit->IsClipped())
+       if ((__pEdit->GetTextLength() == 0 || __pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) && !__pEdit->IsClipped())
        {
                return;
        }
@@ -1912,7 +1914,12 @@ _EditCopyPasteManager::CheckHandleBounds(const Point& point)
        editAbsBounds.x += textObjectBounds.x;
        editAbsBounds.y += textObjectBounds.y;
        editAbsBounds.width = textObjectBounds.width;
-       editAbsBounds.height = textObjectBounds.height;
+
+       if (!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE))
+       {
+               editAbsBounds.height = textObjectBounds.height;
+       }
+
        _Toolbar* pCommandButton = __pEditPresenter->GetKeypadCommandButton();
        if (pCommandButton)
        {
@@ -1972,7 +1979,12 @@ _EditCopyPasteManager::CheckHandleBounds(const FloatPoint& point)
        editAbsBounds.x += textObjectBounds.x;
        editAbsBounds.y += textObjectBounds.y;
        editAbsBounds.width = textObjectBounds.width;
-       editAbsBounds.height = textObjectBounds.height;
+
+       if (!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE))
+       {
+               editAbsBounds.height = textObjectBounds.height;
+       }
+
        _Toolbar* pCommandButton = __pEditPresenter->GetKeypadCommandButton();
        if (pCommandButton)
        {