Skip to content
Permalink
Browse files

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

…exist
  • Loading branch information
nyalldawson committed Aug 1, 2018
1 parent ad7417a commit edec245be2f2b09a87de29d81ce9e669ac0b683a
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/core/raster/qgscolorrampshader.cpp
@@ -359,9 +359,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;
@@ -380,6 +377,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 edec245

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