Skip to content
Permalink
Browse files
Inverted polygons: avoid inplace geometry transformation
  • Loading branch information
Hugo Mercier committed Jun 10, 2014
1 parent 85c57bc commit 5ec4fef13a17fed2ef18ebdb0dd9cc9a9c8c0a12
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/symbology-ng/qgsinvertedpolygonrenderer.cpp
@@ -183,11 +183,11 @@ bool QgsInvertedPolygonRenderer::renderFeature( QgsFeature& feature, QgsRenderCo

// update the geometry
CombinedFeature& cFeat = mFeaturesCategories[ mSymbolCategories[catId] ];
QgsGeometry* geom = feature.geometry();
if ( !geom )
if ( !feature.geometry() )
{
return false;
}
QScopedPointer<QgsGeometry> geom( new QgsGeometry( *feature.geometry() ) );

const QgsCoordinateTransform* xform = context.coordinateTransform();
if ( xform )
@@ -206,7 +206,7 @@ bool QgsInvertedPolygonRenderer::renderFeature( QgsFeature& feature, QgsRenderCo
else
{
// other features: combine them (union)
QgsGeometry* combined = cFeat.feature.geometry()->combine( geom );
QgsGeometry* combined = cFeat.feature.geometry()->combine( geom.data() );
if ( combined && combined->isGeosValid() )
{
cFeat.feature.setGeometry( combined );

0 comments on commit 5ec4fef

Please sign in to comment.