Skip to content

Commit 95b9d38

Browse files
committed
Make sure classifying color ramps for rasters uses the full range of the ramp
1 parent ff41a1d commit 95b9d38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ void QgsSingleBandPseudoColorRendererWidget::on_mClassifyButton_clicked()
319319
for ( int i = 0; i < numberOfEntries; ++i )
320320
{
321321
int idx = mInvertCheckBox->isChecked() ? numberOfEntries - i - 1 : i;
322-
entryColors.push_back( colorRamp->color((( double ) idx ) / numberOfEntries ) );
322+
entryColors.push_back( colorRamp->color((( double ) idx ) / ( numberOfEntries - 1 ) ) );
323323
}
324324
}
325325

0 commit comments

Comments
 (0)