Skip to content

Commit

Permalink
followup a1a65bb: restore wrongly reverted ramp shader fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Aug 10, 2018
1 parent 6fcef30 commit b9e63bb
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

3 comments on commit b9e63bb

@nirvn
Copy link
Contributor Author

@nirvn nirvn commented on b9e63bb Aug 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elpaso , your rebasing of the OpenCL branch prior to merging into master reverted at least one fix; might be worth looking over what was merged in case other valid commits were accidentally reverted.

@elpaso
Copy link
Contributor

@elpaso elpaso commented on b9e63bb Aug 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nirvn I'm sorry, I admit I had a hard time rebasing. I checked the merge commit and I couln't see any other "foreign" commits.

@nirvn
Copy link
Contributor Author

@nirvn nirvn commented on b9e63bb Aug 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elpaso , no worries, thanks for double checking 👍

Please sign in to comment.