Skip to content

Commit

Permalink
Statistics task, feature count task can be canceled on QGIS exit with…
Browse files Browse the repository at this point in the history
…out asking
  • Loading branch information
nyalldawson committed Jul 6, 2021
1 parent 589aabe commit 6ab8c16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsstatisticalsummarydockwidget.cpp
Expand Up @@ -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 )
Expand Down
2 changes: 1 addition & 1 deletion src/core/vector/qgsvectorlayerfeaturecounter.cpp
Expand Up @@ -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 )
Expand Down

0 comments on commit 6ab8c16

Please sign in to comment.