diff options
-rw-r--r-- | src/location/declarativemaps/qdeclarativepolygonmapitem.cpp | 10 | ||||
-rw-r--r-- | src/location/labs/qsg/qmappolygonobjectqsg.cpp | 2 | ||||
-rw-r--r-- | src/location/labs/qsg/qmappolylineobjectqsg.cpp | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp index eab0f214..71a75041 100644 --- a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp +++ b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp @@ -681,16 +681,12 @@ void MapPolygonNode::update(const QColor &fillColor, const QColor &borderColor, * tree. We can't just block the fill without blocking the border too, so * we're a little conservative here (maybe at the expense of rendering * accuracy) */ - if (fillShape->size() == 0) { - if (borderShape->size() == 0) { + if (fillShape->size() == 0 && borderShape->size() == 0) { setSubtreeBlocked(true); return; - } else { - setSubtreeBlocked(false); - } - } else { - setSubtreeBlocked(false); } + setSubtreeBlocked(false); + QSGGeometry *fill = QSGGeometryNode::geometry(); fillShape->allocateAndFill(fill); diff --git a/src/location/labs/qsg/qmappolygonobjectqsg.cpp b/src/location/labs/qsg/qmappolygonobjectqsg.cpp index b9602a3a..239df177 100644 --- a/src/location/labs/qsg/qmappolygonobjectqsg.cpp +++ b/src/location/labs/qsg/qmappolygonobjectqsg.cpp @@ -85,6 +85,8 @@ QSGNode *QMapPolygonObjectPrivateQSG::updateMapObjectNode(QSGNode *oldNode, bool created = false; if (!node) { + if (!m_geometry.size() && !m_borderGeometry.size()) + return nullptr; node = new MapPolygonNode(); *visibleNode = static_cast<VisibleNode *>(node); created = true; diff --git a/src/location/labs/qsg/qmappolylineobjectqsg.cpp b/src/location/labs/qsg/qmappolylineobjectqsg.cpp index 6b782c77..f4a1a288 100644 --- a/src/location/labs/qsg/qmappolylineobjectqsg.cpp +++ b/src/location/labs/qsg/qmappolylineobjectqsg.cpp @@ -107,6 +107,8 @@ QSGNode *QMapPolylineObjectPrivateQSG::updateMapObjectNode(QSGNode *oldNode, bool created = false; if (!node) { + if (!m_geometry.size()) // condition to block the subtree + return nullptr; node = new MapPolylineNode(); *visibleNode = static_cast<VisibleNode *>(node); created = true; |