diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-04-17 13:42:02 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-04-19 11:46:06 +0000 |
commit | 02357b4e73f48566cda168f58025cf13a26ade5b (patch) | |
tree | 5e2da213c7c582451513dd2ddb52a75e679147ca /src/location/declarativemaps/qdeclarativerectanglemapitem.cpp | |
parent | 2a5a2dd5495ca899dfb60eb219ab9fd41a2a25fc (diff) | |
download | qtlocation-02357b4e73f48566cda168f58025cf13a26ade5b.tar.gz |
Fix MapRectangle QQuickItem geometry to allow enabling layers
The geometry now considers the line width, so that, when enabling
layers, the item won't be incorrectly clipped at the borders.
Change-Id: I14578adb2fc393983a3c1be901241d78949c9dde
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qdeclarativerectanglemapitem.cpp')
-rw-r--r-- | src/location/declarativemaps/qdeclarativerectanglemapitem.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/location/declarativemaps/qdeclarativerectanglemapitem.cpp b/src/location/declarativemaps/qdeclarativerectanglemapitem.cpp index 9e32c427..e90c0596 100644 --- a/src/location/declarativemaps/qdeclarativerectanglemapitem.cpp +++ b/src/location/declarativemaps/qdeclarativerectanglemapitem.cpp @@ -290,7 +290,7 @@ void QDeclarativeRectangleMapItem::updatePolish() geometry_.setPreserveGeometry(true, rectangle_.topLeft()); geometry_.updateSourcePoints(*map(), pathMercator_); - geometry_.updateScreenPoints(*map()); + geometry_.updateScreenPoints(*map(), border_.width()); QList<QGeoMapItemGeometry *> geoms; geoms << &geometry_; @@ -320,8 +320,8 @@ void QDeclarativeRectangleMapItem::updatePolish() } QRectF combined = QGeoMapItemGeometry::translateToCommonOrigin(geoms); - setWidth(combined.width()); - setHeight(combined.height()); + setWidth(combined.width() + 2 * border_.width()); + setHeight(combined.height() + 2 * border_.width()); setPositionOnMap(geometry_.origin(), geometry_.firstPointOffset()); } |