Skip to content

Commit

Permalink
Merge pull request #2880 from rouault/avoid_busy_loop_in_QgsVectorLay…
Browse files Browse the repository at this point in the history
…erRenderer_drawRendererV2

QgsVectorLayerRenderer::drawRendererV2(): make it cancellable in all …
  • Loading branch information
jef-n committed Mar 7, 2016
2 parents ed3cb12 + b1f5b5f commit 7ade582
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/qgsvectorlayerrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,15 @@ void QgsVectorLayerRenderer::drawRendererV2( QgsFeatureIterator& fit )
{
try
{
if ( !fet.constGeometry() )
continue; // skip features without geometry

if ( mContext.renderingStopped() )
{
QgsDebugMsg( QString( "Drawing of vector layer %1 cancelled." ).arg( layerID() ) );
break;
}

if ( !fet.constGeometry() )
continue; // skip features without geometry

mContext.expressionContext().setFeature( fet );

bool sel = mContext.showSelection() && mSelectedFeatureIds.contains( fet.id() );
Expand Down

0 comments on commit 7ade582

Please sign in to comment.