Fixed issue with double-tap gestures 61/42061/3
authorPaul Wisbey <p.wisbey@samsung.com>
Mon, 22 Jun 2015 13:39:59 +0000 (14:39 +0100)
committerPaul Wisbey <p.wisbey@samsung.com>
Mon, 22 Jun 2015 15:10:51 +0000 (08:10 -0700)
Change-Id: I9b936ad29454d86fac32216b3210390729bff7d5

adaptors/common/events/tap-gesture-detector.cpp

index 6981f88..06bce59 100644 (file)
@@ -105,8 +105,7 @@ void TapGestureDetector::SendEvent(const Integration::TouchEvent& event)
           {
             mLastTapTime = event.time;
             EmitSingleTap( event.time, point );
-            mState = Clear;
-            break;
+            mState = Registered;
           }
           else
           {
@@ -114,14 +113,13 @@ void TapGestureDetector::SendEvent(const Integration::TouchEvent& event)
             EmitGesture( Gesture::Started, event.time );
             mState = Clear;
           }
-          break;
         }
-        if (pointState == TouchPoint::Down)
+        else if (pointState == TouchPoint::Down)
         {
           Vector2 distanceDelta(abs(mTouchPosition.x - point.screen.x),
                                 abs(mTouchPosition.y - point.screen.y));
 
-          unsigned long timeDelta = abs( mTouchTime - mLastTapTime );
+          unsigned long timeDelta = abs( event.time - mLastTapTime );
 
           if (distanceDelta.x > MAXIMUM_MOTION_ALLOWED ||
               distanceDelta.y > MAXIMUM_MOTION_ALLOWED ||