summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorNatalia Shubina <natalia.shubina@nokia.com>2012-01-16 12:42:07 +1000
committerQt by Nokia <qt-info@nokia.com>2012-01-16 06:38:24 +0100
commit2295778c4b52c781327def18c896a52c2985bd4c (patch)
tree5144963f67c429b5363cb7f431d2b9aeed988104 /examples
parent1c002878880b6396e5682ac5941df8b1a217852f (diff)
downloadqtlocation-2295778c4b52c781327def18c896a52c2985bd4c.tar.gz
ignore touch movement when popup menu is active
Change-Id: Ie80a66289e9569e4b3b59f450293d877e3aaee64 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/mapviewer/content/map/MapComponent.qml8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/declarative/mapviewer/content/map/MapComponent.qml b/examples/declarative/mapviewer/content/map/MapComponent.qml
index 03232a32..08502e1a 100644
--- a/examples/declarative/mapviewer/content/map/MapComponent.qml
+++ b/examples/declarative/mapviewer/content/map/MapComponent.qml
@@ -69,7 +69,7 @@ Map {
property int lastY : -1
property int pressX : -1
property int pressY : -1
- property int jitterThreshold : 10
+ property int jitterThreshold : 30
property bool followme: false
property variant scaleLengths: [5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000, 100000, 200000, 500000, 1000000, 2000000]
signal showDistance(string distance);
@@ -823,7 +823,11 @@ Map {
}
onPositionChanged: {
- map.state = ""
+ if (map.state != "PopupMenu" ||
+ Math.abs(map.pressX - mouse.x ) > map.jitterThreshold ||
+ Math.abs(map.pressY - mouse.y ) > map.jitterThreshold) {
+ map.state = ""
+ }
if ((mouse.button == Qt.LeftButton) & (map.state == "")) {
// if ((map.lastX != -1) && (map.lastY != -1)) {
// var dx = mouse.x - map.lastX