summaryrefslogtreecommitdiff
path: root/src/location/labs/qsg/qmapcircleobjectqsg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/location/labs/qsg/qmapcircleobjectqsg.cpp')
-rw-r--r--src/location/labs/qsg/qmapcircleobjectqsg.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/location/labs/qsg/qmapcircleobjectqsg.cpp b/src/location/labs/qsg/qmapcircleobjectqsg.cpp
index 9fe3ee0a..775016b9 100644
--- a/src/location/labs/qsg/qmapcircleobjectqsg.cpp
+++ b/src/location/labs/qsg/qmapcircleobjectqsg.cpp
@@ -60,7 +60,8 @@ QMapCircleObjectPrivateQSG::QMapCircleObjectPrivateQSG(const QMapCircleObjectPri
QMapCircleObjectPrivateQSG::~QMapCircleObjectPrivateQSG()
{
-
+ if (m_map)
+ m_map->removeMapObject(q);
}
void QMapCircleObjectPrivateQSG::updateCirclePath()
@@ -147,13 +148,18 @@ QGeoMapObjectPrivate *QMapCircleObjectPrivateQSG::clone()
return new QMapCircleObjectPrivateQSG(static_cast<QMapCircleObjectPrivate &>(*this));
}
-QSGNode *QMapCircleObjectPrivateQSG::updateMapObjectNode(QSGNode *oldNode, QSGNode *root, QQuickWindow * /*window*/)
+QSGNode *QMapCircleObjectPrivateQSG::updateMapObjectNode(QSGNode *oldNode,
+ VisibleNode **visibleNode,
+ QSGNode *root,
+ QQuickWindow * /*window*/)
{
+// Q_UNUSED(visibleNode) // coz of -Werror=unused-but-set-parameter
MapPolygonNode *node = static_cast<MapPolygonNode *>(oldNode);
bool created = false;
if (!node) {
node = new MapPolygonNode();
+ *visibleNode = static_cast<VisibleNode *>(node);
created = true;
}