summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Rahn <rahn@kde.org>2016-11-10 19:05:24 (GMT)
committerTorsten Rahn <trahn@testo.de>2016-11-10 19:06:05 (GMT)
commit73b95db97f7abdfb05bca2aea6c089d3e4009963 (patch)
tree0850a6e5e6bdf21d4f17f8e64787ae7b595f2347
parentf9262d857f9986dcc46550e870f78b23a735634f (diff)
Re-add qDeleteAll + clear to get proper rendering again.
-rw-r--r--src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp b/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp
index 1233c94..fed9c3f 100644
--- a/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp
+++ b/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp
@@ -125,7 +125,8 @@ void GeoLineStringGraphicsItem::paint(GeoPainter* painter, const ViewportParams*
setRenderContext(RenderContext(tileLevel));
if (layer.endsWith(QLatin1String("/outline"))) {
- Q_ASSERT(!m_cachedPolygons.isEmpty());
+ qDeleteAll(m_cachedPolygons);
+ m_cachedPolygons.clear();
painter->polygonsFromLineString(*m_renderLineString, m_cachedPolygons);
if (m_cachedPolygons.empty()) {
return;
@@ -147,7 +148,8 @@ void GeoLineStringGraphicsItem::paint(GeoPainter* painter, const ViewportParams*
qDeleteAll(m_cachedPolygons);
m_cachedPolygons.clear();
} else {
- Q_ASSERT(!m_cachedPolygons.isEmpty());
+ qDeleteAll(m_cachedPolygons);
+ m_cachedPolygons.clear();
painter->polygonsFromLineString(*m_renderLineString, m_cachedPolygons);
if (m_cachedPolygons.empty()) {
return;