Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
disable rendering while legend group is removed
  • Loading branch information
jef-n authored and alexbruy committed Dec 25, 2011
1 parent 14c58a5 commit ded240e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/legend/qgslegend.cpp
Expand Up @@ -765,11 +765,20 @@ void QgsLegend::legendGroupRemove()
return;
}

// Turn off rendering to improve speed.
bool renderFlagState = mMapCanvas->renderFlag();
if ( renderFlagState )
mMapCanvas->setRenderFlag( false );

QgsLegendGroup* lg = dynamic_cast<QgsLegendGroup *>( currentItem() );
if ( lg )
{
removeGroup( lg );
}

// Turn on rendering (if it was on previously)
if ( renderFlagState )
mMapCanvas->setRenderFlag( true );
}

void QgsLegend::legendGroupSetCRS()
Expand Down

0 comments on commit ded240e

Please sign in to comment.