summaryrefslogtreecommitdiffstats
path: root/src/location/maps/qgraphicsgeomap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/location/maps/qgraphicsgeomap.cpp')
-rw-r--r--src/location/maps/qgraphicsgeomap.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/location/maps/qgraphicsgeomap.cpp b/src/location/maps/qgraphicsgeomap.cpp
index 2452317fec..d86c760089 100644
--- a/src/location/maps/qgraphicsgeomap.cpp
+++ b/src/location/maps/qgraphicsgeomap.cpp
@@ -256,8 +256,13 @@ QPainterPath QGraphicsGeoMap::shape() const
*/
void QGraphicsGeoMap::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *)
{
- if (d_ptr->mapData)
+ if (d_ptr->mapData) {
+ painter->save();
+ painter->setViewport(pos().x(), pos().y(), size().width(), size().height());
+ painter->setWindow(pos().x(), pos().y(), size().width(), size().height());
d_ptr->mapData->paint(painter, option);
+ painter->restore();
+ }
}
void QGraphicsGeoMap::updateMapDisplay(const QRectF &target)