Skip to content
Permalink
Browse files
Fix incorrect use of QgsRasterPipie::setOn when changing raster pipe …
…resampling stage
  • Loading branch information
nyalldawson committed Jun 23, 2021
1 parent f62ddb3 commit 5875b3d8654f49be8518402118ab0211a4c3b28f
Showing with 14 additions and 4 deletions.
  1. +14 −4 src/core/raster/qgsrasterpipe.cpp
@@ -364,10 +364,20 @@ bool QgsRasterPipe::checkBounds( int idx ) const
void QgsRasterPipe::setResamplingStage( Qgis::RasterResamplingStage stage )
{
mResamplingStage = stage;
setOn( ResamplerRole, stage == ResamplingStage::ResampleFilter );
QgsRasterDataProvider *l_provider = provider();
if ( l_provider )

int resamplerIndex = 0;
for ( QgsRasterInterface *interface : std::as_const( mInterfaces ) )
{
if ( interfaceRole( interface ) == Qgis::RasterPipeInterfaceRole::Resampler )
{
setOn( resamplerIndex, stage == Qgis::RasterResamplingStage::ResampleFilter );
break;
}
resamplerIndex ++;
}

if ( QgsRasterDataProvider *l_provider = provider() )
{
l_provider->enableProviderResampling( stage == ResamplingStage::Provider );
l_provider->enableProviderResampling( stage == Qgis::RasterResamplingStage::Provider );
}
}

0 comments on commit 5875b3d

Please sign in to comment.