diff options
author | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-03-17 10:16:01 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-04-14 08:36:05 +0000 |
commit | c546b09cd8bb69d4a07c9a26c907157fc9793351 (patch) | |
tree | 300f9a7950d14a3ebdcd29bdf45f76582d230b29 | |
parent | 5113ee1a4fb0bae5d921a0365b6aafcd8bbc2d10 (diff) | |
download | qtlocation-c546b09cd8bb69d4a07c9a26c907157fc9793351.tar.gz |
Remove obsolete calls to map.state in mapviewer example
Change-Id: I6fe478f1e7fd3c243c1da9623eac0a80f693e1a8
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
-rw-r--r-- | examples/location/mapviewer/map/MapComponent.qml | 24 | ||||
-rw-r--r-- | examples/location/mapviewer/map/Marker.qml | 1 |
2 files changed, 3 insertions, 22 deletions
diff --git a/examples/location/mapviewer/map/MapComponent.qml b/examples/location/mapviewer/map/MapComponent.qml index 6250f6c7..fc8a8681 100644 --- a/examples/location/mapviewer/map/MapComponent.qml +++ b/examples/location/mapviewer/map/MapComponent.qml @@ -363,7 +363,6 @@ Map { value: map.zoomLevel onValueChanged: { map.zoomLevel = value - map.state="" } } @@ -458,11 +457,7 @@ Map { } onPositionChanged: { - if (Math.abs(map.pressX - parent.x- mouse.x ) > map.jitterThreshold || - Math.abs(map.pressY - parent.y -mouse.y ) > map.jitterThreshold) { - map.state = "" - } - if ((mouse.button == Qt.LeftButton) & (map.state == "")) { + if (mouse.button == Qt.LeftButton) { map.lastX = mouse.x + parent.x map.lastY = mouse.y + parent.y } @@ -526,11 +521,10 @@ Map { onPositionChanged: { if (Math.abs(map.pressX - parent.x- mouse.x ) > map.jitterThreshold || Math.abs(map.pressY - parent.y -mouse.y ) > map.jitterThreshold) { - map.state = "" if (pressed) parent.radius = parent.center.distanceTo( map.toCoordinate(Qt.point(mouse.x, mouse.y))) } - if ((mouse.button == Qt.LeftButton) & (map.state == "")) { + if (mouse.button == Qt.LeftButton) { map.lastX = mouse.x + parent.x map.lastY = mouse.y + parent.y } @@ -586,22 +580,10 @@ Map { map.pressX = mouse.x map.pressY = mouse.y lastCoordinate = map.toCoordinate(Qt.point(mouse.x, mouse.y)) - // if (mouse.button == Qt.MiddleButton) - // addMarker() } onPositionChanged: { - 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 - // var dy = mouse.y - map.lastY - // map.pan(-dx, -dy) - // } + if (mouse.button == Qt.LeftButton) { map.lastX = mouse.x map.lastY = mouse.y } diff --git a/examples/location/mapviewer/map/Marker.qml b/examples/location/mapviewer/map/Marker.qml index 7b123ea6..33213b82 100644 --- a/examples/location/mapviewer/map/Marker.qml +++ b/examples/location/mapviewer/map/Marker.qml @@ -78,7 +78,6 @@ MapQuickItem { break } } - map.state = "" } onPressAndHold:{ |