mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
[raster calculator] use feedback when reprojecting raster block
This commit is contained in:
parent
e27847d383
commit
5fa5b868f8
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user