[raster calculator] use feedback when reprojecting raster block

This commit is contained in:
nirvn 2018-02-09 10:24:49 +07:00 committed by Mathieu Pellerin
parent e27847d383
commit 5fa5b868f8

View File

@ -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
{