Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaria Volvenkova <d.volvenkova@corp.mail.ru>2016-03-18 14:19:26 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:56:57 +0300
commit37dfa2d1a9172f6097727147fefe891f17874dfa (patch)
treeb6c257e89d3afaec0a50d4c2aea2e8da3597f50f
parent7217cbfdb4053d1f06c2b45c7074ba50a884a055 (diff)
Fixed assert on scale or drag.
-rw-r--r--drape_frontend/user_event_stream.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/drape_frontend/user_event_stream.cpp b/drape_frontend/user_event_stream.cpp
index c3c4eef0e8..a68519ecb9 100644
--- a/drape_frontend/user_event_stream.cpp
+++ b/drape_frontend/user_event_stream.cpp
@@ -697,12 +697,26 @@ bool UserEventStream::TouchMove(array<Touch, 2> const & touches, double timestam
isMapTouch = false;
break;
case STATE_DRAG:
- ASSERT_EQUAL(touchCount, 1, ());
- Drag(touches[0], timestamp);
+ if (touchCount > 1)
+ {
+ ASSERT_EQUAL(GetValidTouchesCount(m_touches), 1, ());
+ EndDrag(m_touches[0], true /* cancelled */);
+ }
+ else
+ {
+ Drag(touches[0], timestamp);
+ }
break;
case STATE_SCALE:
- ASSERT_EQUAL(touchCount, 2, ());
- Scale(touches[0], touches[1]);
+ if (touchCount < 2)
+ {
+ ASSERT_EQUAL(GetValidTouchesCount(m_touches), 2, ());
+ EndScale(m_touches[0], m_touches[1]);
+ }
+ else
+ {
+ Scale(touches[0], touches[1]);
+ }
break;
default:
ASSERT(false, ());