diff options
Diffstat (limited to 'src/imports/location/qdeclarativepolygonmapitem.cpp')
-rw-r--r-- | src/imports/location/qdeclarativepolygonmapitem.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/imports/location/qdeclarativepolygonmapitem.cpp b/src/imports/location/qdeclarativepolygonmapitem.cpp index 9a71614f..6fdef816 100644 --- a/src/imports/location/qdeclarativepolygonmapitem.cpp +++ b/src/imports/location/qdeclarativepolygonmapitem.cpp @@ -332,7 +332,7 @@ QDeclarativePolygonMapItem::QDeclarativePolygonMapItem(QQuickItem *parent) void QDeclarativePolygonMapItem::handleBorderUpdated() { borderGeometry_.markSourceDirty(); - updateMapItem(); + polishAndUpdate(); } QDeclarativePolygonMapItem::~QDeclarativePolygonMapItem() @@ -367,7 +367,7 @@ void QDeclarativePolygonMapItem::setMap(QDeclarativeGeoMap *quickMap, QGeoMap *m if (map) { geometry_.markSourceDirty(); borderGeometry_.markSourceDirty(); - updateMapItem(); + polishAndUpdate(); } } @@ -423,7 +423,7 @@ void QDeclarativePolygonMapItem::setPath(const QJSValue &value) geometry_.markSourceDirty(); borderGeometry_.markSourceDirty(); - updateMapItem(); + polishAndUpdate(); emit pathChanged(); } @@ -441,7 +441,7 @@ void QDeclarativePolygonMapItem::addCoordinate(const QGeoCoordinate &coordinate) geometry_.markSourceDirty(); borderGeometry_.markSourceDirty(); - updateMapItem(); + polishAndUpdate(); emit pathChanged(); } @@ -465,7 +465,7 @@ void QDeclarativePolygonMapItem::removeCoordinate(const QGeoCoordinate &coordina geometry_.markSourceDirty(); borderGeometry_.markSourceDirty(); - updateMapItem(); + polishAndUpdate(); emit pathChanged(); } @@ -489,7 +489,7 @@ void QDeclarativePolygonMapItem::setColor(const QColor &color) color_ = color; dirtyMaterial_ = true; - updateMapItem(); + update(); emit colorChanged(color_); } @@ -519,7 +519,7 @@ QSGNode *QDeclarativePolygonMapItem::updateMapItemPaintNode(QSGNode *oldNode, Up /*! \internal */ -void QDeclarativePolygonMapItem::updateMapItem() +void QDeclarativePolygonMapItem::updatePolish() { if (!map() || path_.count() == 0) return; @@ -546,7 +546,6 @@ void QDeclarativePolygonMapItem::updateMapItem() setHeight(combined.height()); setPositionOnMap(path_.at(0), -1 * geometry_.sourceBoundingBox().topLeft()); - update(); } /*! @@ -582,7 +581,7 @@ void QDeclarativePolygonMapItem::afterViewportChanged(const QGeoMapViewportChang borderGeometry_.setPreserveGeometry(true, borderGeometry_.geoLeftBound()); geometry_.markScreenDirty(); borderGeometry_.markScreenDirty(); - updateMapItem(); + polishAndUpdate(); } /*! @@ -639,7 +638,7 @@ void QDeclarativePolygonMapItem::geometryChanged(const QRectF &newGeometry, cons borderGeometry_.setPreserveGeometry(true, leftBoundCoord); geometry_.markSourceDirty(); borderGeometry_.markSourceDirty(); - updateMapItem(); + polishAndUpdate(); emit pathChanged(); } |