From 48ec56482fdc62db41a4a091320310af338a83ac Mon Sep 17 00:00:00 2001 From: Chulheon Date: Mon, 8 Apr 2013 22:15:14 +0900 Subject: [PATCH] fixed bug [N_SE-32922][N_SE-32979] Change-Id: I34f57a2539a5cec77b40e25481c1ad0bf5b58e70 --- src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp b/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp index a6f5d0a..3c9cbbd 100755 --- a/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp +++ b/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp @@ -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) { -- 2.7.4