summaryrefslogtreecommitdiffstats
path: root/examples/location/mapviewer
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@theqtcompany.com>2015-03-17 10:16:01 +0100
committerMichal Klocek <michal.klocek@theqtcompany.com>2015-04-14 08:36:05 +0000
commitc546b09cd8bb69d4a07c9a26c907157fc9793351 (patch)
tree300f9a7950d14a3ebdcd29bdf45f76582d230b29 /examples/location/mapviewer
parent5113ee1a4fb0bae5d921a0365b6aafcd8bbc2d10 (diff)
Remove obsolete calls to map.state in mapviewer example
Change-Id: I6fe478f1e7fd3c243c1da9623eac0a80f693e1a8 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'examples/location/mapviewer')
-rw-r--r--examples/location/mapviewer/map/MapComponent.qml24
-rw-r--r--examples/location/mapviewer/map/Marker.qml1
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:{