Skip to content
Permalink
Browse files
Fix broken area scaling for simple marker symbols
  • Loading branch information
nyalldawson committed May 21, 2015
1 parent d62794d commit a32ac3d43a75ede56f89cbbca99cdf90481b14b8
Showing with 14 additions and 8 deletions.
  1. +14 −8 src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
@@ -469,19 +469,25 @@ void QgsSimpleMarkerSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV
return;
}

double scaledSize = mSize;

bool hasDataDefinedSize = context.renderHints() & QgsSymbolV2::DataDefinedSizeScale || hasDataDefinedProperty( EXPR_SIZE );

double scaledSize = mSize;
bool ok;
if ( hasDataDefinedSize )
bool ok = true;
if ( hasDataDefinedProperty( EXPR_SIZE ) )
{
if ( hasDataDefinedProperty( EXPR_SIZE ) )
scaledSize = evaluateDataDefinedProperty( EXPR_SIZE, context.feature(), mSize, &ok ).toDouble();
}

if ( hasDataDefinedSize && ok )
{
switch ( mScaleMethod )
{
scaledSize = evaluateDataDefinedProperty( EXPR_SIZE, context.feature(), mSize, &ok ).toDouble();
if ( ok && mScaleMethod == QgsSymbolV2::ScaleArea )
{
case QgsSymbolV2::ScaleArea:
scaledSize = sqrt( scaledSize );
}
break;
case QgsSymbolV2::ScaleDiameter:
break;
}
}

0 comments on commit a32ac3d

Please sign in to comment.