diff options
author | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2016-07-18 15:24:49 +0300 |
---|---|---|
committer | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2016-07-18 15:27:36 +0300 |
commit | 5bf8f20577cac0867ee21b733e49d1a966af477b (patch) | |
tree | 37fe41f7bb84abbcbf0a380fd0b7b61d87f8c915 /drape_frontend | |
parent | d45e117cc7d4a559a6ea66158f61d53adb5211cc (diff) |
Fixed assert on scaling with two fingers.
Diffstat (limited to 'drape_frontend')
-rw-r--r-- | drape_frontend/user_event_stream.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drape_frontend/user_event_stream.cpp b/drape_frontend/user_event_stream.cpp index 11cda5b227..ea9c49467d 100644 --- a/drape_frontend/user_event_stream.cpp +++ b/drape_frontend/user_event_stream.cpp @@ -749,8 +749,10 @@ bool UserEventStream::TouchUp(array<Touch, 2> const & touches) isMapTouch = false; break; case STATE_TAP_DETECTION: - ASSERT_EQUAL(touchCount, 1, ()); - EndTapDetector(touches[0]); + if (touchCount == 1) + EndTapDetector(touches[0]); + else + CancelTapDetector(); break; case STATE_TAP_TWO_FINGERS: if (touchCount == 2) @@ -768,8 +770,15 @@ bool UserEventStream::TouchUp(array<Touch, 2> const & touches) isMapTouch = EndDrag(touches[0], false /* cancelled */); break; case STATE_SCALE: - ASSERT_EQUAL(touchCount, 2, ()); - EndScale(touches[0], touches[1]); + if (touchCount < 2) + { + ASSERT_EQUAL(GetValidTouchesCount(m_touches), 2, ()); + EndScale(m_touches[0], m_touches[1]); + } + else + { + EndScale(touches[0], touches[1]); + } break; default: ASSERT(false, ()); |