Skip to content
Permalink
Browse files

Fix scalebar alignment in composer (ticket #6317)

  • Loading branch information
mhugent committed Sep 15, 2012
1 parent d0800fb commit c0ee7f0ee99a1a57e067623cb762ee5e0fcf545f
Showing with 4 additions and 6 deletions.
  1. +4 −6 src/core/composer/qgscomposerscalebar.cpp
@@ -465,6 +465,9 @@ bool QgsComposerScaleBar::readXML( const QDomElement& itemElem, const QDomDocume
QString styleString = itemElem.attribute( "style", "" );
setStyle( tr( styleString.toLocal8Bit().data() ) );

mUnits = ( ScaleBarUnits )itemElem.attribute( "units" ).toInt();
mAlignment = ( Alignment )( itemElem.attribute( "alignment", "0" ).toInt() );

//map
int mapId = itemElem.attribute( "mapId", "-1" ).toInt();
if ( mapId >= 0 )
@@ -478,12 +481,7 @@ bool QgsComposerScaleBar::readXML( const QDomElement& itemElem, const QDomDocume
}
}

mUnits = ( ScaleBarUnits )itemElem.attribute( "units" ).toInt();

refreshSegmentMillimeters();

//alignment
mAlignment = ( Alignment )( itemElem.attribute( "alignment", "0" ).toInt() );
updateSegmentSize();

//restore general composer item properties
QDomNodeList composerItemList = itemElem.elementsByTagName( "ComposerItem" );

0 comments on commit c0ee7f0

Please sign in to comment.
You can’t perform that action at this time.