Skip to content

Commit

Permalink
Auxiliary field creation is correctly managed for width in QgsSymbols…
Browse files Browse the repository at this point in the history
…ListWidget
  • Loading branch information
pblottiere committed Oct 9, 2017
1 parent 703fbde commit 9306226
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/gui/symbology/qgssymbolslistwidget.cpp
Expand Up @@ -162,15 +162,23 @@ void QgsSymbolsListWidget::createAuxiliaryField()
button->setToProperty( property );

QgsMarkerSymbol *markerSymbol = static_cast<QgsMarkerSymbol *>( mSymbol );
QgsLineSymbol *lineSymbol = static_cast<QgsLineSymbol *>( mSymbol );
switch ( key )
{
case QgsSymbolLayer::PropertyAngle:
markerSymbol->setDataDefinedAngle( button->toProperty() );
if ( markerSymbol )
markerSymbol->setDataDefinedAngle( button->toProperty() );
break;
case QgsSymbolLayer::PropertySize:
markerSymbol->setDataDefinedSize( button->toProperty() );
markerSymbol->setScaleMethod( QgsSymbol::ScaleDiameter );
if ( markerSymbol )
{
markerSymbol->setDataDefinedSize( button->toProperty() );
markerSymbol->setScaleMethod( QgsSymbol::ScaleDiameter );
}
break;
case QgsSymbolLayer::PropertyStrokeWidth:
if ( lineSymbol )
lineSymbol->setDataDefinedWidth( button->toProperty() );
default:
break;
}
Expand Down

0 comments on commit 9306226

Please sign in to comment.