mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04:00
Don't calculate unwanted stats for stats dock
This commit is contained in:
parent
7fb4bea279
commit
8f9c73b938
@ -106,10 +106,14 @@ void QgsStatisticalSummaryDockWidget::refreshStatistics()
|
||||
}
|
||||
|
||||
QList< QgsStatisticalSummary::Statistic > statsToDisplay;
|
||||
QgsStatisticalSummary::Statistics statsToCalc = 0;
|
||||
foreach ( QgsStatisticalSummary::Statistic stat, mDisplayStats )
|
||||
{
|
||||
if ( mStatsActions.value( stat )->isChecked() )
|
||||
{
|
||||
statsToDisplay << stat;
|
||||
statsToCalc |= stat;
|
||||
}
|
||||
}
|
||||
|
||||
int extraRows = 0;
|
||||
@ -117,7 +121,7 @@ void QgsStatisticalSummaryDockWidget::refreshStatistics()
|
||||
extraRows++;
|
||||
|
||||
QgsStatisticalSummary stats;
|
||||
stats.setStatistics( QgsStatisticalSummary::All );
|
||||
stats.setStatistics( statsToCalc );
|
||||
stats.calculate( values );
|
||||
|
||||
mStatisticsTable->setRowCount( statsToDisplay.count() + extraRows );
|
||||
|
Loading…
x
Reference in New Issue
Block a user