diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-03-10 10:48:50 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-03-13 10:46:35 +0000 |
commit | f63a4ea289c3bb5f9bd7948f3fb20362c15776d5 (patch) | |
tree | 299ce76e3c232aac2d7681187a8651ce1d99b05d /src/location/declarativemaps/qquickgeomapgesturearea.cpp | |
parent | b0480d83282d76c6740ed71323155adbf97de9fa (diff) | |
download | qtlocation-f63a4ea289c3bb5f9bd7948f3fb20362c15776d5.tar.gz |
Handle flick state on gesture enabling/disabling
Change-Id: I178c3ff8d93ce672b0d7e168acbf691c4ddd80de
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qquickgeomapgesturearea.cpp')
-rw-r--r-- | src/location/declarativemaps/qquickgeomapgesturearea.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/location/declarativemaps/qquickgeomapgesturearea.cpp b/src/location/declarativemaps/qquickgeomapgesturearea.cpp index c2782f36..c0dbe0ad 100644 --- a/src/location/declarativemaps/qquickgeomapgesturearea.cpp +++ b/src/location/declarativemaps/qquickgeomapgesturearea.cpp @@ -702,8 +702,10 @@ void QQuickGeoMapGestureArea::setPanEnabled(bool enabled) m_flick.m_panEnabled = enabled; // unlike the pinch, the pan existing functionality is to stop immediately - if (!enabled) + if (!enabled) { stopPan(); + m_flickState = flickInactive; + } } /*! @@ -724,7 +726,14 @@ void QQuickGeoMapGestureArea::setFlickEnabled(bool enabled) m_flick.m_flickEnabled = enabled; // unlike the pinch, the flick existing functionality is to stop immediately if (!enabled) { - stopFlick(); + bool stateActive = (m_flickState != flickInactive); + stopFlick(); + if (stateActive) { + if (m_flick.m_panEnabled) + m_flickState = panActive; + else + m_flickState = flickInactive; + } } } |