Skip to content
Permalink
Browse files

minimalist smooth mesh rendering when pan/zoom for mesh layer

  • Loading branch information
vcloarec authored and nyalldawson committed Feb 9, 2021
1 parent c6dcea7 commit 3e7ea83397f89669e2b74967f241e7fb3c7a615e
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/mesh/qgsmeshlayerrenderer.cpp
@@ -60,6 +60,8 @@ QgsMeshLayerRenderer::QgsMeshLayerRenderer(
// cppcheck-suppress assertWithSideEffect
Q_ASSERT( layer->dataProvider() );

mReadyToCompose = false;

// copy native mesh
mNativeMesh = *( layer->nativeMesh() );
mLayerExtent = layer->extent();
@@ -287,6 +289,7 @@ void QgsMeshLayerRenderer::copyVectorDatasetValues( QgsMeshLayer *layer )

bool QgsMeshLayerRenderer::render()
{
mReadyToCompose = false;
QgsScopedQPainterState painterState( renderContext()->painter() );
if ( !mClippingRegions.empty() )
{
@@ -297,6 +300,7 @@ bool QgsMeshLayerRenderer::render()
}

renderScalarDataset();
mReadyToCompose = true;
renderMesh();
renderVectorDataset();

0 comments on commit 3e7ea83

Please sign in to comment.