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

0 comments on commit edec245

Please sign in to comment.