Skip to content

Commit c8266a2

Browse files
committedDec 5, 2016
Followup 08ee180: more appropriate ramp type property name
1 parent dc697d0 commit c8266a2

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed
 

‎src/core/effects/qgsgloweffect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ void QgsGlowEffect::readProperties( const QgsStringMap &props )
176176

177177
//attempt to create color ramp from props
178178
delete mRamp;
179-
if ( props.contains( QStringLiteral( "gradientType" ) ) && props[QStringLiteral( "gradientType" )] == QStringLiteral( "cpt-city" ) )
179+
if ( props.contains( QStringLiteral( "rampType" ) ) && props[QStringLiteral( "rampType" )] == QStringLiteral( "cpt-city" ) )
180180
{
181181
mRamp = QgsCptCityColorRamp::create( props );
182182
}

‎src/core/qgscolorramp.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ QgsStringMap QgsGradientColorRamp::properties() const
218218
map["info_" + it.key()] = it.value();
219219
}
220220

221-
map[QStringLiteral( "gradientType" )] = type();
221+
map[QStringLiteral( "rampType" )] = type();
222222
return map;
223223
}
224224
void QgsGradientColorRamp::convertToDiscrete( bool discrete )
@@ -368,7 +368,7 @@ QgsStringMap QgsLimitedRandomColorRamp::properties() const
368368
map[QStringLiteral( "satMax" )] = QString::number( mSatMax );
369369
map[QStringLiteral( "valMin" )] = QString::number( mValMin );
370370
map[QStringLiteral( "valMax" )] = QString::number( mValMax );
371-
map[QStringLiteral( "gradientType" )] = type();
371+
map[QStringLiteral( "rampType" )] = type();
372372
return map;
373373
}
374374

@@ -586,7 +586,7 @@ QgsStringMap QgsColorBrewerColorRamp::properties() const
586586
map[QStringLiteral( "schemeName" )] = mSchemeName;
587587
map[QStringLiteral( "colors" )] = QString::number( mColors );
588588
map[QStringLiteral( "inverted" )] = QString::number( mInverted );
589-
map[QStringLiteral( "gradientType" )] = type();
589+
map[QStringLiteral( "rampType" )] = type();
590590
return map;
591591
}
592592

@@ -675,7 +675,7 @@ QgsStringMap QgsCptCityColorRamp::properties() const
675675
QgsStringMap map;
676676
map[QStringLiteral( "schemeName" )] = mSchemeName;
677677
map[QStringLiteral( "variantName" )] = mVariantName;
678-
map[QStringLiteral( "gradientType" )] = type();
678+
map[QStringLiteral( "rampType" )] = type();
679679
return map;
680680
}
681681

@@ -890,7 +890,7 @@ QgsStringMap QgsPresetSchemeColorRamp::properties() const
890890
props.insert( QStringLiteral( "preset_color_%1" ).arg( i ), QgsSymbolLayerUtils::encodeColor( mColors.at( i ).first ) );
891891
props.insert( QStringLiteral( "preset_color_name_%1" ).arg( i ), mColors.at( i ).second );
892892
}
893-
props[QStringLiteral( "gradientType" )] = type();
893+
props[QStringLiteral( "rampType" )] = type();
894894
return props;
895895
}
896896

‎src/core/symbology-ng/qgsfillsymbollayer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ QgsSymbolLayer* QgsGradientFillSymbolLayer::create( const QgsStringMap& props )
539539

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

10281028
//attempt to create color ramp from props
10291029
QgsColorRamp* gradientRamp;
1030-
if ( props.contains( QStringLiteral( "gradientType" ) ) && props["gradientType"] == QStringLiteral( "cpt-city" ) )
1030+
if ( props.contains( QStringLiteral( "rampType" ) ) && props["rampType"] == QStringLiteral( "cpt-city" ) )
10311031
{
10321032
gradientRamp = QgsCptCityColorRamp::create( props );
10331033
}

0 commit comments

Comments
 (0)
Please sign in to comment.