Skip to content
Permalink
Browse files

Avoid use of QgsDataDefined::expressionOrField for rotationField values

Maintains behaviour of < 2.10 API
  • Loading branch information
nyalldawson committed Aug 6, 2015
1 parent 933069d commit ae0a532c9eb88fac7793d47474dea3f71cdc70f1
@@ -825,7 +825,8 @@ QString QgsCategorizedSymbolRendererV2::rotationField() const
if ( mSourceSymbol->type() == QgsSymbolV2::Marker )
{
QgsMarkerSymbolV2 * s = static_cast<QgsMarkerSymbolV2 *>( mSourceSymbol.data() );
return s->dataDefinedAngle().expressionOrField();
QgsDataDefined ddAngle = s->dataDefinedAngle();
return ddAngle.useExpression() ? ddAngle.expressionString() : ddAngle.field();
}

return QString();
@@ -1376,7 +1376,8 @@ QString QgsGraduatedSymbolRendererV2::rotationField() const
if ( mSourceSymbol->type() == QgsSymbolV2::Marker )
{
QgsMarkerSymbolV2 * s = static_cast<QgsMarkerSymbolV2 *>( mSourceSymbol.data() );
return s->dataDefinedAngle().expressionOrField();
QgsDataDefined ddAngle = s->dataDefinedAngle();
return ddAngle.useExpression() ? ddAngle.expressionString() : ddAngle.field();
}

return QString();
@@ -165,7 +165,8 @@ QString QgsSingleSymbolRendererV2::rotationField() const
if ( mSymbol->type() == QgsSymbolV2::Marker )
{
QgsMarkerSymbolV2 * s = static_cast<QgsMarkerSymbolV2 *>( mSymbol.data() );
return s->dataDefinedAngle().expressionOrField();
QgsDataDefined ddAngle = s->dataDefinedAngle();
return ddAngle.useExpression() ? ddAngle.expressionString() : ddAngle.field();
}

return QString();

0 comments on commit ae0a532

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