Skip to content
Permalink
Browse files
Followup 08ee180: more appropriate ramp type property name
  • Loading branch information
nirvn committed Dec 5, 2016
1 parent dc697d0 commit c8266a251296df64b8397dda729ae01c78af8881
Showing with 8 additions and 8 deletions.
  1. +1 −1 src/core/effects/qgsgloweffect.cpp
  2. +5 −5 src/core/qgscolorramp.cpp
  3. +2 −2 src/core/symbology-ng/qgsfillsymbollayer.cpp
@@ -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 );
}
@@ -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 )
@@ -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;
}

@@ -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;
}

@@ -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;
}

@@ -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;
}

@@ -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 );
}
@@ -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 );
}

0 comments on commit c8266a2

Please sign in to comment.