From a30c9f4a3cd28826e72059d191e57312731768ee Mon Sep 17 00:00:00 2001 From: Chulheon Date: Tue, 18 Jun 2013 13:51:50 +0900 Subject: [PATCH] fixed bug Change-Id: I57c29a296db2f376074d371e196e60bda7e301b4 --- src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp | 1 + src/ui/controls/FUiCtrl_EditPresenter.cpp | 28 +++++++++++++++++------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp b/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp index 208a64f..3792f8d 100644 --- a/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp +++ b/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp @@ -2311,6 +2311,7 @@ _EditCopyPasteManager::Show(void) __pHandle[HANDLER_TYPE_CENTER]->SetHandlerCursorPosition(__pEdit->GetCursorPosition()); // __pHandle[HANDLER_TYPE_CENTER]->MoveCopyPasteMagnifier(); } + __pHandle[HANDLER_TYPE_CENTER]->AdjustBounds(); __pHandle[HANDLER_TYPE_CENTER]->CheckReverseStatus(); __pEdit->Invalidate(); } diff --git a/src/ui/controls/FUiCtrl_EditPresenter.cpp b/src/ui/controls/FUiCtrl_EditPresenter.cpp index 47a289b..8c31d7f 100755 --- a/src/ui/controls/FUiCtrl_EditPresenter.cpp +++ b/src/ui/controls/FUiCtrl_EditPresenter.cpp @@ -1453,6 +1453,8 @@ _EditPresenter::Initialize(const _Control& control) __initialBounds = __pEdit->GetBoundsF(); + __defaultTouchMoveThreshold = __pEdit->GetTouchPressThreshold(); + __pCursorVisualElement = new (std::nothrow) _VisualElement; SysTryCatch(NID_UI_CTRL, __pCursorVisualElement, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance"); @@ -3050,6 +3052,7 @@ _EditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchIn } __isTouchPressed = true; + __isTouchReleaseSkipped = false; __pScrollEffect->previousY = _CoordinateSystemUtils::ConvertToFloat(touchInfo.GetCurrentPosition().y); __pScrollEffect->currentY = _CoordinateSystemUtils::ConvertToFloat(touchInfo.GetCurrentPosition().y); @@ -3083,7 +3086,6 @@ _EditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchIn && (__pressedPoint.y >= __clearIconBounds.y) && (__pressedPoint.y <= __clearIconBounds.y + __clearIconBounds.height)) // Clear Icon Pressed { __isClearIconPressed = true; - __defaultTouchMoveThreshold = __pEdit->GetTouchPressThreshold(); __pEdit->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_IN_CLEAR_AREA); } } @@ -3105,6 +3107,7 @@ _EditPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchi if (__isClearIconPressed) { __isClearIconPressed = false; + __pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold); } __isTouchPressed = false; @@ -3144,6 +3147,7 @@ _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchI { FloatPoint touchPoint = touchInfo.GetCurrentPosition(); __isClearIconPressed = false; + __pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold); if ((touchPoint.x >= __clearIconBounds.x) && (touchPoint.x <= __clearIconBounds.x + __clearIconBounds.width) && (touchPoint.y >= __clearIconBounds.y) && (touchPoint.y <= __clearIconBounds.y + __clearIconBounds.height)) { @@ -3151,7 +3155,6 @@ _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchI __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); __isMovingCursorByTouchMove = false; __pEdit->Invalidate(); - __pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold); } } } @@ -3188,6 +3191,8 @@ _EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchI if (__isClearIconPressed) { __isClearIconPressed = false; + __pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold); + if ((touchPoint.x >= __clearIconBounds.x) && (touchPoint.x <= __clearIconBounds.x + __clearIconBounds.width) && (touchPoint.y >= __clearIconBounds.y) && (touchPoint.y <= __clearIconBounds.y + __clearIconBounds.height)) { @@ -3394,6 +3399,7 @@ _EditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo || (touchPoint.y < __clearIconBounds.y) || (touchPoint.y > __clearIconBounds.y + __clearIconBounds.height)) { __isClearIconPressed = false; + __pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold); __pEdit->Invalidate(); } } @@ -3401,7 +3407,10 @@ _EditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo if (__isCopyPasteManagerExist) { __pCopyPasteManager->Show(); - __isCopyPastePopupMoving = true; + if (!__isClearIconPressed) + { + __isCopyPastePopupMoving = true; + } } if (__isTouchMoving == false && IsHorizontalDirection(touchInfo)) @@ -4475,6 +4484,11 @@ _EditPresenter::OnLongPressGestureDetected(void) { SysLog(NID_UI_CTRL, "OnLongPressGestureDetected"); + if (__isClearIconPressed) + { + return true; + } + __isTouchPressed = false; _AccessibilityManager* pAccessibilityManager = _AccessibilityManager::GetInstance(); @@ -4485,11 +4499,6 @@ _EditPresenter::OnLongPressGestureDetected(void) return false; } - if (__isClearIconPressed) - { - return true; - } - if (__isCopyPasteManagerExist) { return true; @@ -6140,6 +6149,8 @@ _EditPresenter::IsUpdateInitialBounds(void) bool _EditPresenter::OnFocusGained(void) { + __pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold); + if (!__pParentForm) { __pParentForm = GetParentForm(); @@ -6296,6 +6307,7 @@ _EditPresenter::OnFocusLost(void) if (!__pEdit->IsDestroyed()) { InitializeCopyPasteManager(); + __pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold); } if (__isAutoShrinkEnabled) -- 2.7.4