diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2016-12-05 12:43:52 +0100 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2016-12-05 12:43:52 +0100 |
commit | 335116ea024f51e1693bba39f78e15131870f1b0 (patch) | |
tree | 148ccdb4703b4a35afb1b0e3875573b1eb90d0ce /src/imports/location/qdeclarativepolylinemapitem.cpp | |
parent | 5e4bc1fe908896e9b90e8ad9c3896f35b5ec37be (diff) | |
parent | ba9b7b9ef674d93680070f6c4bb1053d0d2325dd (diff) | |
download | qtlocation-335116ea024f51e1693bba39f78e15131870f1b0.tar.gz |
Merge remote-tracking branch 'gerrit/5.8' into dev
Conflicts:
src/imports/location/qdeclarativegeomap.cpp
src/location/maps/maps.pri
src/location/maps/qgeomap_p_p.h
src/plugins/geoservices/nokia/qgeocodereply_nokia.cpp
src/plugins/geoservices/osm/qgeoroutereplyosm.cpp
Change-Id: I18d31cff9233648178fe3e2636ce294026dfaeb7
Diffstat (limited to 'src/imports/location/qdeclarativepolylinemapitem.cpp')
-rw-r--r-- | src/imports/location/qdeclarativepolylinemapitem.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/imports/location/qdeclarativepolylinemapitem.cpp b/src/imports/location/qdeclarativepolylinemapitem.cpp index c4150d2a..2153b036 100644 --- a/src/imports/location/qdeclarativepolylinemapitem.cpp +++ b/src/imports/location/qdeclarativepolylinemapitem.cpp @@ -200,9 +200,9 @@ void QGeoMapPolylineGeometry::updateSourcePoints(const QGeoMap &map, srcPointTypes_.clear(); srcPointTypes_.reserve(path.size()); - QDoubleVector2D origin, lastPoint, lastAddedPoint; + QDoubleVector2D origin, lastAddedPoint; - const double mapWidthHalf = map.width()/2.0; + const double mapWidthHalf = map.viewportWidth()/2.0; double unwrapBelowX = 0; if (preserveGeometry_) unwrapBelowX = map.coordinateToItemPosition(geoLeftBound_, false).x(); @@ -263,8 +263,6 @@ void QGeoMapPolylineGeometry::updateSourcePoints(const QGeoMap &map, lastAddedPoint = point; } } - - lastPoint = point; } sourceBounds_ = QRectF(QPointF(minX, minY), QPointF(maxX, maxY)); @@ -402,7 +400,7 @@ void QGeoMapPolylineGeometry::updateScreenPoints(const QGeoMap &map, // Create the viewport rect in the same coordinate system // as the actual points - QRectF viewport(0, 0, map.width(), map.height()); + QRectF viewport(0, 0, map.viewportWidth(), map.viewportHeight()); viewport.adjust(-strokeWidth, -strokeWidth, strokeWidth, strokeWidth); viewport.translate(-1 * origin); |