Skip to content

Commit

Permalink
allow cancellation with slow data sources
Browse files Browse the repository at this point in the history
  • Loading branch information
root676 authored and nyalldawson committed Jul 2, 2020
1 parent 95cd14d commit 9655f77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/analysis/processing/qgsalgorithmcellstatistics.cpp
Expand Up @@ -237,6 +237,8 @@ QVariantMap QgsCellStatisticsAlgorithm::processAlgorithm( const QVariantMap &par
std::vector< std::unique_ptr< QgsRasterBlock > > inputBlocks;
for ( const QgsRasterAnalysisUtils::RasterLogicInput &i : mInputs )
{
if(feedback->isCanceled())
break; //in case some slow data sources are loaded
for ( int band : i.bands )
{
std::unique_ptr< QgsRasterBlock > b( i.interface->block( band, blockExtent, iterCols, iterRows ) );
Expand Down

0 comments on commit 9655f77

Please sign in to comment.