Skip to content
Permalink
Browse files

Fix accidental inversion of color ramps in layouts

  • Loading branch information
nyalldawson committed Dec 18, 2020
1 parent 59e9c63 commit 75525b37bd896e34467da40b6174d9133a03a2d5
@@ -217,8 +217,8 @@ QSizeF QgsColorRampLegendNode::drawSymbol( const QgsLegendSettings &settings, It
const double gradientTop = rampTopMm * dotsPerMM;
const double gradientBottom = gradientTop + height * dotsPerMM;

QLinearGradient gradient( 0, mSettings.direction() == QgsColorRampLegendNodeSettings::MinimumToMaximum ? gradientTop : gradientBottom,
0, mSettings.direction() == QgsColorRampLegendNodeSettings::MinimumToMaximum ? gradientBottom : gradientTop );
QLinearGradient gradient( 0, mSettings.direction() == QgsColorRampLegendNodeSettings::MinimumToMaximum ? gradientBottom : gradientTop,
0, mSettings.direction() == QgsColorRampLegendNodeSettings::MinimumToMaximum ? gradientTop : gradientBottom );
if ( mRamp->type() == QgsGradientColorRamp::typeString() || mRamp->type() == QgsCptCityColorRamp::typeString() )
{
//color ramp gradient
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 75525b3

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