Skip to content
Permalink
Browse files
Statistics task, feature count task can be canceled on QGIS exit with…
…out asking
  • Loading branch information
nyalldawson committed Jul 6, 2021
1 parent 589aabe commit 6ab8c16dc3179d640ffa6e8c903d39359116bea9
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/app/qgsstatisticalsummarydockwidget.cpp
  2. +1 −1 src/core/vector/qgsvectorlayerfeaturecounter.cpp
@@ -567,7 +567,7 @@ QgsStatisticalSummaryDockWidget::DataType QgsStatisticalSummaryDockWidget::field
}

QgsStatisticsValueGatherer::QgsStatisticsValueGatherer( QgsVectorLayer *layer, const QgsFeatureIterator &fit, long featureCount, const QString &sourceFieldExp )
: QgsTask( tr( "Fetching statistic values" ) )
: QgsTask( tr( "Fetching statistic values" ), QgsTask::CanCancel | QgsTask::CancelWithoutPrompt )
, mFeatureIterator( fit )
, mFeatureCount( featureCount )
, mFieldExpression( sourceFieldExp )
@@ -19,7 +19,7 @@
#include "qgsfeedback.h"

QgsVectorLayerFeatureCounter::QgsVectorLayerFeatureCounter( QgsVectorLayer *layer, const QgsExpressionContext &context, bool storeSymbolFids )
: QgsTask( tr( "Counting features in %1" ).arg( layer->name() ), QgsTask::CanCancel )
: QgsTask( tr( "Counting features in %1" ).arg( layer->name() ), QgsTask::CanCancel | QgsTask::CancelWithoutPrompt )
, mSource( new QgsVectorLayerFeatureSource( layer ) )
, mRenderer( layer->renderer()->clone() )
, mExpressionContext( context )

0 comments on commit 6ab8c16

Please sign in to comment.