Skip to content
Permalink
Browse files
Fix reading of units from project files before output unit change
  • Loading branch information
mhugent committed Mar 15, 2013
1 parent 9e16b51 commit 5281b484ec90f7c550a9aa88e7345f314c830457
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/core/symbology-ng/qgssymbollayerv2utils.cpp
@@ -739,6 +739,10 @@ QgsSymbolV2* QgsSymbolLayerV2Utils::loadSymbol( QDomElement& element )
return NULL;
}

if ( element.hasAttribute( "outputUnit" ) )
{
symbol->setOutputUnit( decodeOutputUnit( element.attribute( "outputUnit" ) ) );
}
symbol->setAlpha( element.attribute( "alpha", "1.0" ).toDouble() );

return symbol;
@@ -785,7 +789,6 @@ QDomElement QgsSymbolLayerV2Utils::saveSymbol( QString name, QgsSymbolV2* symbol
QDomElement symEl = doc.createElement( "symbol" );
symEl.setAttribute( "type", _nameForSymbolType( symbol->type() ) );
symEl.setAttribute( "name", name );
symEl.setAttribute( "outputUnit", encodeOutputUnit( symbol->outputUnit() ) );
symEl.setAttribute( "alpha", QString::number( symbol->alpha() ) );
QgsDebugMsg( "num layers " + QString::number( symbol->symbolLayerCount() ) );

0 comments on commit 5281b48

Please sign in to comment.