Skip to content

Commit

Permalink
Update qgsstatisticalsummarydockwidget.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
agiudiceandrea authored Mar 4, 2024
1 parent bc20ec6 commit 50a8bd0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/app/qgsstatisticalsummarydockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,17 +280,20 @@ void QgsStatisticalSummaryDockWidget::updateNumericStatistics()
const QList< QVariant > variantValues = mGatherer->values();

QList<double> values;
bool convertOk = false;
bool convertOk;
int missingValues = 0;
const auto constVariantValues = variantValues;
for ( const QVariant &value : constVariantValues )
{
const double val = value.toDouble( &convertOk );
if ( convertOk )
values << val;
else if ( QgsVariantUtils::isNull( value ) )
{
if ( QgsVariantUtils::isNull( value ) )
missingValues += 1;
else
{
const double val = value.toDouble( &convertOk );
if ( convertOk )
values << val;
else
missingValues += 1;
}
}

Expand Down

0 comments on commit 50a8bd0

Please sign in to comment.