diff options
author | Liang Qi <liang.qi@qt.io> | 2017-06-07 11:06:28 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-06-07 11:06:28 +0200 |
commit | f55629245259ba7364e258f92408823024423caa (patch) | |
tree | f73063cf02dc175fbe9f0bfb48b3ddd686ea0f72 /examples/location/mapviewer/map/MapComponent.qml | |
parent | 22d980c8124026eb712f563326d5a5c1b180c671 (diff) | |
parent | d89701c5c8646dedb0ebb2e011c4da796a6ae8a1 (diff) | |
download | qtlocation-f55629245259ba7364e258f92408823024423caa.tar.gz |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
.qmake.conf
src/plugins/geoservices/geoservices.pro
Change-Id: Ie82dd22c588e5cba409fc1ef31a65968ce9f719b
Diffstat (limited to 'examples/location/mapviewer/map/MapComponent.qml')
-rw-r--r-- | examples/location/mapviewer/map/MapComponent.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/location/mapviewer/map/MapComponent.qml b/examples/location/mapviewer/map/MapComponent.qml index c450a150..570505a0 100644 --- a/examples/location/mapviewer/map/MapComponent.qml +++ b/examples/location/mapviewer/map/MapComponent.qml @@ -604,9 +604,9 @@ Map { var mouseGeoPos = map.toCoordinate(Qt.point(mouse.x, mouse.y)); var preZoomPoint = map.fromCoordinate(mouseGeoPos, false); if (mouse.button === Qt.LeftButton) { - map.zoomLevel++; + map.zoomLevel = Math.floor(map.zoomLevel + 1) } else if (mouse.button === Qt.RightButton) { - map.zoomLevel--; + map.zoomLevel = Math.floor(map.zoomLevel - 1) } var postZoomPoint = map.fromCoordinate(mouseGeoPos, false); var dx = postZoomPoint.x - preZoomPoint.x; |