Skip to content

Commit f1b065b

Browse files
blazekalexbruy
authored andcommitted
set raster stats bandName and bandNumber, fixes one problem of #4193 - band name can only be set to "" or "Not set".
1 parent ccbd7aa commit f1b065b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/core/qgsrasterdataprovider.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ QgsRasterBandStats QgsRasterDataProvider::bandStatistics( int theBandNo )
241241
double myNoDataValue = noDataValue();
242242
QgsRasterBandStats myRasterBandStats;
243243
myRasterBandStats.elementCount = 0; // because we'll be counting only VALID pixels later
244+
myRasterBandStats.bandName = generateBandName( theBandNo );
245+
myRasterBandStats.bandNumber = theBandNo;
244246

245247
int myDataType = dataType( theBandNo );
246248

0 commit comments

Comments
 (0)