Skip to content

Commit c0ee7f0

Browse files
committedSep 15, 2012
Fix scalebar alignment in composer (ticket #6317)
1 parent d0800fb commit c0ee7f0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed
 

‎src/core/composer/qgscomposerscalebar.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,9 @@ bool QgsComposerScaleBar::readXML( const QDomElement& itemElem, const QDomDocume
465465
QString styleString = itemElem.attribute( "style", "" );
466466
setStyle( tr( styleString.toLocal8Bit().data() ) );
467467

468+
mUnits = ( ScaleBarUnits )itemElem.attribute( "units" ).toInt();
469+
mAlignment = ( Alignment )( itemElem.attribute( "alignment", "0" ).toInt() );
470+
468471
//map
469472
int mapId = itemElem.attribute( "mapId", "-1" ).toInt();
470473
if ( mapId >= 0 )
@@ -478,12 +481,7 @@ bool QgsComposerScaleBar::readXML( const QDomElement& itemElem, const QDomDocume
478481
}
479482
}
480483

481-
mUnits = ( ScaleBarUnits )itemElem.attribute( "units" ).toInt();
482-
483-
refreshSegmentMillimeters();
484-
485-
//alignment
486-
mAlignment = ( Alignment )( itemElem.attribute( "alignment", "0" ).toInt() );
484+
updateSegmentSize();
487485

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

0 commit comments

Comments
 (0)
Please sign in to comment.