Fix in DateTimeBar related to consuming the OnTouch
authorSyed Khaja Moinuddin <moinuddin.s@samsung.com>
Mon, 18 Mar 2013 02:12:37 +0000 (11:12 +0900)
committerSyed Khaja Moinuddin <moinuddin.s@samsung.com>
Mon, 18 Mar 2013 02:12:37 +0000 (11:12 +0900)
events and OnTouchMoved requirement.
Signed-off-by: Syed Khaja Moinuddin <moinuddin.s@samsung.com>
Change-Id: I48f68c25920ae3a1cb46be6144ec9b96570646c7

src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp

index a87dca7..9a8c458 100644 (file)
@@ -936,7 +936,7 @@ _DateTimeBarPresenter::OnTouchPressed(const _Control& source, const _TouchInfo&
        if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false)
        {
                __isFlickEnabled = false;
-               return false;
+               return true;
        }
 
        if (__isFlickInProgress)
@@ -968,6 +968,16 @@ _DateTimeBarPresenter::OnTouchReleased(const _Control& source, const _TouchInfo&
                return false;
        }
 
+       if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false && !__isFlickInProgress && !__isTouchMoved)
+       {
+               __isTouchMoved = false;
+               PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP);
+               __pDateTimeBar->SetVisibleState(false);
+               __pDateTimeBar->Close();
+               ResetFlickAnimationTimer();
+               return true;
+       }
+
        int index = GetItemIndexFromPosition(touchinfo.GetCurrentPosition());
        bool isEventFire = true;
 
@@ -985,15 +995,6 @@ _DateTimeBarPresenter::OnTouchReleased(const _Control& source, const _TouchInfo&
        __isTouchMoved = false;
        __distance = 0.0f;
 
-       if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false && !__isFlickInProgress)
-       {
-               PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP);
-               __pDateTimeBar->SetVisibleState(false);
-               __pDateTimeBar->Close();
-               ResetFlickAnimationTimer();
-               return false;
-       }
-
        __pDateTimeBar->Invalidate();
 
        if (isEventFire == true)
@@ -1038,7 +1039,7 @@ _DateTimeBarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& to
 
        if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false || __touchMoveHandled == true)
        {
-               return false;
+               return true;
        }
 
        _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();