Skip to content
Permalink
Browse files

allow cancellation with slow data sources

  • Loading branch information
root676 authored and nyalldawson committed Jul 2, 2020
1 parent 95cd14d commit 9655f77000cd5c7db84f626635e327a0c9f30cd0
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/analysis/processing/qgsalgorithmcellstatistics.cpp
@@ -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 ) );

0 comments on commit 9655f77

Please sign in to comment.
You can’t perform that action at this time.