File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -824,14 +824,15 @@ const QgsRasterBandStats QgsRasterLayer::bandStatistics( int theBandNo )
824
824
continue ; // NULL
825
825
}
826
826
827
+ myRasterBandStats.sum += myValue;
828
+ ++myRasterBandStats.elementCount ;
827
829
// only use this element if we have a non null element
828
830
if ( myFirstIterationFlag )
829
831
{
830
832
// this is the first iteration so initialise vars
831
833
myFirstIterationFlag = false ;
832
834
myRasterBandStats.minimumValue = myValue;
833
835
myRasterBandStats.maximumValue = myValue;
834
- ++myRasterBandStats.elementCount ;
835
836
} // end of true part for first iteration check
836
837
else
837
838
{
@@ -844,9 +845,6 @@ const QgsRasterBandStats QgsRasterLayer::bandStatistics( int theBandNo )
844
845
{
845
846
myRasterBandStats.maximumValue = myValue;
846
847
}
847
-
848
- myRasterBandStats.sum += myValue;
849
- ++myRasterBandStats.elementCount ;
850
848
} // end of false part for first iteration check
851
849
}
852
850
}
You can’t perform that action at this time.
0 commit comments