Skip to content

Commit

Permalink
Follow up 6b973e1
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 7, 2014
1 parent 476faee commit 4750211
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/core/composer/qgscomposerpicture.cpp
Expand Up @@ -697,7 +697,8 @@ bool QgsComposerPicture::readXML( const QDomElement& itemElem, const QDomDocumen
mPictureWidth = itemElem.attribute( "pictureWidth", "10" ).toDouble();
mPictureHeight = itemElem.attribute( "pictureHeight", "10" ).toDouble();
mResizeMode = QgsComposerPicture::ResizeMode( itemElem.attribute( "resizeMode", "0" ).toInt() );
mPictureAnchor = QgsComposerItem::ItemPositionMode( itemElem.attribute( "anchorPoint", QString( QgsComposerItem::UpperLeft ) ).toInt() );
//when loading from xml, default to anchor point of middle to match pre 2.4 behaviour
mPictureAnchor = ( QgsComposerItem::ItemPositionMode ) itemElem.attribute( "anchorPoint", QString::number( QgsComposerItem::Middle ) ).toInt();

QDomNodeList composerItemList = itemElem.elementsByTagName( "ComposerItem" );
if ( composerItemList.size() > 0 )
Expand Down
4 changes: 2 additions & 2 deletions src/core/composer/qgscomposertablecolumn.cpp
Expand Up @@ -54,11 +54,11 @@ bool QgsComposerTableColumn::writeXML( QDomElement& columnElem, QDomDocument& do

bool QgsComposerTableColumn::readXML( const QDomElement& columnElem )
{
mHAlignment = ( Qt::AlignmentFlag )columnElem.attribute( "hAlignment", QString( Qt::AlignLeft ) ).toInt();
mHAlignment = ( Qt::AlignmentFlag )columnElem.attribute( "hAlignment", QString::number( Qt::AlignLeft ) ).toInt();
mHeading = columnElem.attribute( "heading", "" );
mAttribute = columnElem.attribute( "attribute", "" );
mSortByRank = columnElem.attribute( "sortByRank", "0" ).toInt();
mSortOrder = ( Qt::SortOrder )columnElem.attribute( "sortOrder", QString( Qt::AscendingOrder ) ).toInt();
mSortOrder = ( Qt::SortOrder )columnElem.attribute( "sortOrder", QString::number( Qt::AscendingOrder ) ).toInt();

QDomNodeList bgColorList = columnElem.elementsByTagName( "backgroundColor" );
if ( bgColorList.size() > 0 )
Expand Down

0 comments on commit 4750211

Please sign in to comment.