Skip to content
Permalink
Browse files

Don't try to update raster min/max settings when a raster layer

is set to "updated canvas" sampling mode and the layer is being
rendered as part of a 3d render job

It causes crashes, but even if it worked, its not going to give
usable results...
  • Loading branch information
nyalldawson committed Jul 28, 2020
1 parent 9e1cdda commit 91132af5df9a1be7901f34a7fa0f5f0f857bcb67
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/core/raster/qgsrasterlayerrenderer.cpp
@@ -228,7 +228,9 @@ QgsRasterLayerRenderer::QgsRasterLayerRenderer( QgsRasterLayer *layer, QgsRender
mPipe = new QgsRasterPipe( *layer->pipe() );
QObject::connect( mPipe->provider(), &QgsRasterDataProvider::statusChanged, layer, &QgsRasterLayer::statusChanged );
QgsRasterRenderer *rasterRenderer = mPipe->renderer();
if ( rasterRenderer && !( rendererContext.flags() & QgsRenderContext::RenderPreviewJob ) )
if ( rasterRenderer
&& !( rendererContext.flags() & QgsRenderContext::RenderPreviewJob )
&& !( rendererContext.flags() & QgsRenderContext::Render3DMap ) )
layer->refreshRendererIfNeeded( rasterRenderer, rendererContext.extent() );

const QgsRasterLayerTemporalProperties *temporalProperties = qobject_cast< const QgsRasterLayerTemporalProperties * >( layer->temporalProperties() );

0 comments on commit 91132af

Please sign in to comment.
You can’t perform that action at this time.