We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 137a211 commit 6009f5aCopy full SHA for 6009f5a
src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp
@@ -336,7 +336,7 @@ void QgsSingleBandPseudoColorRendererWidget::classify()
336
337
if ( mClassificationModeComboBox->currentData().toInt() == Continuous )
338
{
339
- if ( colorRamp.data() )
+ if ( colorRamp.data() && colorRamp->count() > 1 )
340
341
numberOfEntries = colorRamp->count();
342
entryValues.reserve( numberOfEntries );
@@ -450,7 +450,7 @@ void QgsSingleBandPseudoColorRendererWidget::classify()
450
}
451
452
453
- if ( !colorRamp.data() )
+ if ( !colorRamp.data() || colorRamp->count() == 1 )
454
455
//hard code color range from blue -> red (previous default)
456
int colorDiff = 0;
0 commit comments