Skip to content

Commit

Permalink
Fix accidental inversion of color ramps in layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 18, 2020
1 parent 59e9c63 commit 75525b3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/layertree/qgscolorramplegendnode.cpp
Expand Up @@ -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
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 75525b3

Please sign in to comment.