Skip to content

Commit

Permalink
Fix #10595 (symbol units not applied when loading symbol from library)
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Jun 16, 2014
1 parent 52e9ee5 commit 8b1f537
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/symbology-ng/qgssymbolslistwidget.cpp
Expand Up @@ -300,6 +300,7 @@ void QgsSymbolsListWidget::setSymbolFromStyle( const QModelIndex & index )
lblSymbolName->setText( symbolName );
// get new instance of symbol from style
QgsSymbolV2* s = mStyle->symbol( symbolName );
QgsSymbolV2::OutputUnit unit = s->outputUnit();
// remove all symbol layers from original symbol
while ( mSymbol->symbolLayerCount() )
mSymbol->deleteSymbolLayer( 0 );
Expand All @@ -310,7 +311,7 @@ void QgsSymbolsListWidget::setSymbolFromStyle( const QModelIndex & index )
mSymbol->appendSymbolLayer( sl );
}
mSymbol->setAlpha( s->alpha() );
mSymbol->setOutputUnit( s->outputUnit() );
mSymbol->setOutputUnit( unit );
// delete the temporary symbol
delete s;

Expand Down

0 comments on commit 8b1f537

Please sign in to comment.