Skip to content

Commit

Permalink
Fix regression in raster psuedo ramp rendering when only two classes …
Browse files Browse the repository at this point in the history
…exist

(cherry-picked from edec245)
  • Loading branch information
nyalldawson committed Aug 1, 2018
1 parent 5306056 commit 067ee2b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/raster/qgscolorrampshader.cpp
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 067ee2b

Please sign in to comment.