Skip to content
Permalink
Browse files

Fix regression in raster psuedo ramp rendering when only two classes …

…exist

(cherry-picked from edec245)
  • Loading branch information
nyalldawson committed Aug 1, 2018
1 parent 5306056 commit 067ee2b37df8fc5705a50373911bd6a830e7d660
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/core/raster/qgscolorrampshader.cpp
@@ -346,9 +346,6 @@ bool QgsColorRampShader::shade( double value, int *returnRedValue, int *returnGr
mLUTInitialized = true;
}

if ( mLUT.empty() )
return false;

// overflow indicates that value > maximum value + DOUBLE_DIFF_THRESHOLD
// that way idx can point to the last valid item
bool overflow = false;
@@ -367,6 +364,10 @@ bool QgsColorRampShader::shade( double value, int *returnRedValue, int *returnGr
overflow = true;
}
}
else if ( lutIndex < 0 )
{
return false;
}
else
{
// get initial value from LUT

0 comments on commit 067ee2b

Please sign in to comment.
You can’t perform that action at this time.