Skip to content

Commit c6436f8

Browse files
committed
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.
1 parent 9a9df32 commit c6436f8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/app/qgslayerstylingwidget.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,7 @@ void QgsLayerStylingWidget::apply()
268268
{
269269
emit styleChanged( mCurrentLayer );
270270
QgsProject::instance()->setDirty( true );
271-
mMapCanvas->clearCache();
272-
mMapCanvas->refresh();
271+
mCurrentLayer->triggerRepaint();
273272
}
274273
connect( mCurrentLayer, SIGNAL( styleChanged() ), this, SLOT( updateCurrentWidgetLayer() ) );
275274
}

0 commit comments

Comments
 (0)