Make modifications through the style dock much faster

Before any change in the style dock would invalidate the cache
for ALL map layers, resulting in every layer being redrawn.

Now only the affected layer is redrawn and all others just use
the cached render.
This commit is contained in:
Nyall Dawson 2016-10-06 18:50:45 +10:00
parent 9a9df32cca
commit c6436f8971

View File

@ -268,8 +268,7 @@ void QgsLayerStylingWidget::apply()
{
emit styleChanged( mCurrentLayer );
QgsProject::instance()->setDirty( true );
mMapCanvas->clearCache();
mMapCanvas->refresh();
mCurrentLayer->triggerRepaint();
}
connect( mCurrentLayer, SIGNAL( styleChanged() ), this, SLOT( updateCurrentWidgetLayer() ) );
}