Navigation Menu

Skip to content

Commit

Permalink
Don't try to update raster min/max settings when a raster layer
Browse files Browse the repository at this point in the history
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...

(cherry picked from commit 91132af)
  • Loading branch information
nyalldawson committed Jul 29, 2020
1 parent cbfdf3b commit 1763d33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/raster/qgsrasterlayerrenderer.cpp
Expand Up @@ -227,7 +227,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() );
Expand Down

0 comments on commit 1763d33

Please sign in to comment.