Skip to content

Commit edec245

Browse files
committed
Fix regression in raster psuedo ramp rendering when only two classes exist
1 parent ad7417a commit edec245

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/core/raster/qgscolorrampshader.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,6 @@ bool QgsColorRampShader::shade( double value, int *returnRedValue, int *returnGr
359359
mLUTInitialized = true;
360360
}
361361

362-
if ( mLUT.empty() )
363-
return false;
364-
365362
// overflow indicates that value > maximum value + DOUBLE_DIFF_THRESHOLD
366363
// that way idx can point to the last valid item
367364
bool overflow = false;
@@ -380,6 +377,10 @@ bool QgsColorRampShader::shade( double value, int *returnRedValue, int *returnGr
380377
overflow = true;
381378
}
382379
}
380+
else if ( lutIndex < 0 )
381+
{
382+
return false;
383+
}
383384
else
384385
{
385386
// get initial value from LUT

0 commit comments

Comments
 (0)