From 78e863078f34a8553c21cd5c61fb2689419cd4a2 Mon Sep 17 00:00:00 2001 From: woojin nam Date: Fri, 28 Jun 2013 13:28:37 +0000 Subject: [PATCH] Revert "Revert "Change input param of GetTokenIndexFromCoordinate() to FloatPoint" This reverts commit 9801aa98c6507b986e6dc6c70330fee80607301e" This reverts commit f1c69c104a606b906aa54dedaf60da0f1e73e7f0 Change-Id: I87b5a46c9f9c0ee7ae3c5bc8065c4c574f3be27a --- src/ui/controls/FUiCtrl_TokenEditPresenter.cpp | 8 ++++---- src/ui/inc/FUiCtrl_TokenEditPresenter.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp b/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp index 9faeedc..d67d6c2 100644 --- a/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp +++ b/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp @@ -2049,7 +2049,7 @@ _TokenEditPresenter::TrimTokenAndAdjustEllipsisAt(int index) } int -_TokenEditPresenter::GetTokenIndexFromCoordinate(const Point point) const +_TokenEditPresenter::GetTokenIndexFromCoordinate(const FloatPoint point) const { int tokenIndex = -1; @@ -2060,7 +2060,7 @@ _TokenEditPresenter::GetTokenIndexFromCoordinate(const Point point) const if (pToken) { FloatRectangle tokenRect = pToken->displayRect; - if (tokenRect.Contains(FloatPoint(point.x, point.y))) + if (tokenRect.Contains(point)) { tokenIndex = i; break; @@ -2218,7 +2218,7 @@ _TokenEditPresenter::SetTokenBoundsByTouchInfo(const _TouchInfo& touchinfo) result _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _TouchInfo& touchinfo) { - int tokenIndex = GetTokenIndexFromCoordinate(_CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition())); + int tokenIndex = GetTokenIndexFromCoordinate(touchinfo.GetCurrentPosition()); //Reset "longPressed" when Touch released on a different token after long gesture on a token if (__trackTokenIndex != tokenIndex) @@ -2930,7 +2930,7 @@ _TokenEditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& to //Remove token focus on touch press __focusedTokenIndex = -1; - int tokenIndex = GetTokenIndexFromCoordinate(_CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition())); + int tokenIndex = GetTokenIndexFromCoordinate(touchinfo.GetCurrentPosition()); __trackTokenIndex = tokenIndex; _TouchInfo TouchInfo(touchinfo); diff --git a/src/ui/inc/FUiCtrl_TokenEditPresenter.h b/src/ui/inc/FUiCtrl_TokenEditPresenter.h index 80e43a4..7f5a255 100644 --- a/src/ui/inc/FUiCtrl_TokenEditPresenter.h +++ b/src/ui/inc/FUiCtrl_TokenEditPresenter.h @@ -186,7 +186,7 @@ private: bool DrawDescriptionText(void); result SetDescriptionTextRect(const Tizen::Graphics::FloatRectangle& rect); result TrimTokenAndAdjustEllipsisAt(int index); - int GetTokenIndexFromCoordinate(const Tizen::Graphics::Point point) const; + int GetTokenIndexFromCoordinate(const Tizen::Graphics::FloatPoint point) const; result SetEditingTokenTextBounds(int index, bool isSetText = true); result ProcessTokeningByTouchEvent(const _Control& source, const _TouchInfo& touchinfo); result SetTokenBoundsByTouchInfo(const _TouchInfo& touchinfo); -- 2.7.4