Revert "Change input param of GetTokenIndexFromCoordinate() to FloatPoint"
authorwoojin nam <w.nam@samsung.com>
Fri, 28 Jun 2013 13:23:15 +0000 (13:23 +0000)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Fri, 28 Jun 2013 13:23:15 +0000 (13:23 +0000)
This reverts commit 9801aa98c6507b986e6dc6c70330fee80607301e

Change-Id: Ibb5d2ffce2697afee0f152cf24793ed5c55008dc

src/ui/controls/FUiCtrl_TokenEditPresenter.cpp
src/ui/inc/FUiCtrl_TokenEditPresenter.h

index d67d6c2..9faeedc 100644 (file)
@@ -2049,7 +2049,7 @@ _TokenEditPresenter::TrimTokenAndAdjustEllipsisAt(int index)
 }
 
 int
-_TokenEditPresenter::GetTokenIndexFromCoordinate(const FloatPoint point) const
+_TokenEditPresenter::GetTokenIndexFromCoordinate(const Point point) const
 {
        int tokenIndex = -1;
 
@@ -2060,7 +2060,7 @@ _TokenEditPresenter::GetTokenIndexFromCoordinate(const FloatPoint point) const
                if (pToken)
                {
                        FloatRectangle tokenRect = pToken->displayRect;
-                       if (tokenRect.Contains(point))
+                       if (tokenRect.Contains(FloatPoint(point.x, point.y)))
                        {
                                tokenIndex = i;
                                break;
@@ -2218,7 +2218,7 @@ _TokenEditPresenter::SetTokenBoundsByTouchInfo(const _TouchInfo& touchinfo)
 result
 _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _TouchInfo& touchinfo)
 {
-       int tokenIndex = GetTokenIndexFromCoordinate(touchinfo.GetCurrentPosition());
+       int tokenIndex = GetTokenIndexFromCoordinate(_CoordinateSystemUtils::ConvertToInteger(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(touchinfo.GetCurrentPosition());
+       int tokenIndex = GetTokenIndexFromCoordinate(_CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()));
        __trackTokenIndex = tokenIndex;
 
        _TouchInfo TouchInfo(touchinfo);
index 7f5a255..80e43a4 100644 (file)
@@ -186,7 +186,7 @@ private:
        bool DrawDescriptionText(void);
        result SetDescriptionTextRect(const Tizen::Graphics::FloatRectangle& rect);
        result TrimTokenAndAdjustEllipsisAt(int index);
-       int GetTokenIndexFromCoordinate(const Tizen::Graphics::FloatPoint point) const;
+       int GetTokenIndexFromCoordinate(const Tizen::Graphics::Point point) const;
        result SetEditingTokenTextBounds(int index, bool isSetText = true);
        result ProcessTokeningByTouchEvent(const _Control& source, const _TouchInfo& touchinfo);
        result SetTokenBoundsByTouchInfo(const _TouchInfo& touchinfo);