Skip to content

Commit a3331f1

Browse files
committedOct 6, 2016
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. (cherry-picked from c6436f8)
1 parent 736b2da commit a3331f1

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
@@ -262,8 +262,7 @@ void QgsLayerStylingWidget::apply()
262262
{
263263
emit styleChanged( mCurrentLayer );
264264
QgsProject::instance()->setDirty( true );
265-
mMapCanvas->clearCache();
266-
mMapCanvas->refresh();
265+
mCurrentLayer->triggerRepaint();
267266
}
268267
connect( mCurrentLayer, SIGNAL( styleChanged() ), this, SLOT( updateCurrentWidgetLayer() ) );
269268
}

0 commit comments

Comments
 (0)
Please sign in to comment.