diff options
Diffstat (limited to 'src/location/declarativemaps/qdeclarativepolygonmapitem.cpp')
-rw-r--r-- | src/location/declarativemaps/qdeclarativepolygonmapitem.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp index f4cdc6bf..6da4d96f 100644 --- a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp +++ b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp @@ -50,6 +50,7 @@ #include <QtPositioning/private/qdoublevector2d_p.h> #include <QtPositioning/private/qclipperutils_p.h> +#include <QtPositioning/private/qgeopolygon_p.h> /* poly2tri triangulator includes */ #include <clip2tri.h> @@ -318,6 +319,8 @@ QDeclarativePolygonMapItem::QDeclarativePolygonMapItem(QQuickItem *parent) : QDeclarativeGeoMapItemBase(parent), border_(this), color_(Qt::transparent), dirtyMaterial_(true), updatingGeometry_(false) { + m_itemType = QGeoMap::MapPolygon; + geopath_ = QGeoPolygonEager(); setFlag(ItemHasContents, true); QObject::connect(&border_, SIGNAL(colorChanged(QColor)), this, SLOT(markSourceDirtyAndUpdate())); @@ -611,7 +614,7 @@ void QDeclarativePolygonMapItem::setGeoShape(const QGeoShape &shape) if (shape == geopath_) return; - geopath_ = shape; + geopath_ = QGeoPolygonEager(shape); regenerateCache(); geometry_.setPreserveGeometry(true, geopath_.boundingGeoRectangle().topLeft()); borderGeometry_.setPreserveGeometry(true, geopath_.boundingGeoRectangle().topLeft()); @@ -619,11 +622,6 @@ void QDeclarativePolygonMapItem::setGeoShape(const QGeoShape &shape) emit pathChanged(); } -QGeoMap::ItemType QDeclarativePolygonMapItem::itemType() const -{ - return QGeoMap::MapPolygon; -} - /*! \internal */ |