Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Followup 08ee180: more appropriate ramp type property name
  • Loading branch information
nirvn committed Dec 5, 2016
1 parent dc697d0 commit c8266a2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/core/effects/qgsgloweffect.cpp
Expand Up @@ -176,7 +176,7 @@ void QgsGlowEffect::readProperties( const QgsStringMap &props )

//attempt to create color ramp from props
delete mRamp;
if ( props.contains( QStringLiteral( "gradientType" ) ) && props[QStringLiteral( "gradientType" )] == QStringLiteral( "cpt-city" ) )
if ( props.contains( QStringLiteral( "rampType" ) ) && props[QStringLiteral( "rampType" )] == QStringLiteral( "cpt-city" ) )
{
mRamp = QgsCptCityColorRamp::create( props );
}
Expand Down
10 changes: 5 additions & 5 deletions src/core/qgscolorramp.cpp
Expand Up @@ -218,7 +218,7 @@ QgsStringMap QgsGradientColorRamp::properties() const
map["info_" + it.key()] = it.value();
}

map[QStringLiteral( "gradientType" )] = type();
map[QStringLiteral( "rampType" )] = type();
return map;
}
void QgsGradientColorRamp::convertToDiscrete( bool discrete )
Expand Down Expand Up @@ -368,7 +368,7 @@ QgsStringMap QgsLimitedRandomColorRamp::properties() const
map[QStringLiteral( "satMax" )] = QString::number( mSatMax );
map[QStringLiteral( "valMin" )] = QString::number( mValMin );
map[QStringLiteral( "valMax" )] = QString::number( mValMax );
map[QStringLiteral( "gradientType" )] = type();
map[QStringLiteral( "rampType" )] = type();
return map;
}

Expand Down Expand Up @@ -586,7 +586,7 @@ QgsStringMap QgsColorBrewerColorRamp::properties() const
map[QStringLiteral( "schemeName" )] = mSchemeName;
map[QStringLiteral( "colors" )] = QString::number( mColors );
map[QStringLiteral( "inverted" )] = QString::number( mInverted );
map[QStringLiteral( "gradientType" )] = type();
map[QStringLiteral( "rampType" )] = type();
return map;
}

Expand Down Expand Up @@ -675,7 +675,7 @@ QgsStringMap QgsCptCityColorRamp::properties() const
QgsStringMap map;
map[QStringLiteral( "schemeName" )] = mSchemeName;
map[QStringLiteral( "variantName" )] = mVariantName;
map[QStringLiteral( "gradientType" )] = type();
map[QStringLiteral( "rampType" )] = type();
return map;
}

Expand Down Expand Up @@ -890,7 +890,7 @@ QgsStringMap QgsPresetSchemeColorRamp::properties() const
props.insert( QStringLiteral( "preset_color_%1" ).arg( i ), QgsSymbolLayerUtils::encodeColor( mColors.at( i ).first ) );
props.insert( QStringLiteral( "preset_color_name_%1" ).arg( i ), mColors.at( i ).second );
}
props[QStringLiteral( "gradientType" )] = type();
props[QStringLiteral( "rampType" )] = type();
return props;
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/symbology-ng/qgsfillsymbollayer.cpp
Expand Up @@ -539,7 +539,7 @@ QgsSymbolLayer* QgsGradientFillSymbolLayer::create( const QgsStringMap& props )

//attempt to create color ramp from props
QgsColorRamp* gradientRamp;
if ( props.contains( QStringLiteral( "gradientType" ) ) && props[QStringLiteral( "gradientType" )] == QStringLiteral( "cpt-city" ) )
if ( props.contains( QStringLiteral( "rampType" ) ) && props[QStringLiteral( "rampType" )] == QStringLiteral( "cpt-city" ) )
{
gradientRamp = QgsCptCityColorRamp::create( props );
}
Expand Down Expand Up @@ -1027,7 +1027,7 @@ QgsSymbolLayer* QgsShapeburstFillSymbolLayer::create( const QgsStringMap& props

//attempt to create color ramp from props
QgsColorRamp* gradientRamp;
if ( props.contains( QStringLiteral( "gradientType" ) ) && props["gradientType"] == QStringLiteral( "cpt-city" ) )
if ( props.contains( QStringLiteral( "rampType" ) ) && props["rampType"] == QStringLiteral( "cpt-city" ) )
{
gradientRamp = QgsCptCityColorRamp::create( props );
}
Expand Down

0 comments on commit c8266a2

Please sign in to comment.