Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix reading of units from project files before output unit change
  • Loading branch information
mhugent committed Mar 15, 2013
1 parent 9e16b51 commit 5281b48
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/symbology-ng/qgssymbollayerv2utils.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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() ) );

Expand Down

0 comments on commit 5281b48

Please sign in to comment.