Skip to content
Permalink
Browse files
[raster calculator] use feedback when reprojecting raster block
  • Loading branch information
nirvn committed Feb 9, 2018
1 parent e27847d commit 5fa5b86
Showing 1 changed file with 10 additions and 1 deletion.
@@ -88,7 +88,16 @@ int QgsRasterCalculator::processCalculation( QgsFeedback *feedback )
proj.setInput( it->raster->dataProvider() );
proj.setPrecision( QgsRasterProjector::Exact );

block = proj.block( it->bandNumber, mOutputRectangle, mNumOutputColumns, mNumOutputRows );
QgsRasterBlockFeedback *rasterBlockFeedback = new QgsRasterBlockFeedback();
QObject::connect( feedback, &QgsFeedback::canceled, rasterBlockFeedback, &QgsRasterBlockFeedback::cancel );
block = proj.block( it->bandNumber, mOutputRectangle, mNumOutputColumns, mNumOutputRows, rasterBlockFeedback );
if ( rasterBlockFeedback->isCanceled() )
{
delete block;
delete calcNode;
qDeleteAll( inputBlocks );
return static_cast< int >( Canceled );
}
}
else
{

0 comments on commit 5fa5b86

Please sign in to comment.