Skip to content

Commit 70138fa

Browse files
committed
Read / write map annotation format to xml
1 parent fa57840 commit 70138fa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/core/composer/qgscomposermap.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,7 @@ bool QgsComposerMap::writeXML( QDomElement& elem, QDomDocument & doc ) const
711711

712712
//grid annotation
713713
QDomElement annotationElem = doc.createElement( "Annotation" );
714+
annotationElem.setAttribute( "format", mGridAnnotationFormat );
714715
annotationElem.setAttribute( "show", mShowGridAnnotation );
715716
annotationElem.setAttribute( "leftPosition", mLeftGridAnnotationPosition );
716717
annotationElem.setAttribute( "rightPosition", mRightGridAnnotationPosition );
@@ -849,6 +850,7 @@ bool QgsComposerMap::readXML( const QDomElement& itemElem, const QDomDocument& d
849850
{
850851
QDomElement annotationElem = annotationNodeList.at( 0 ).toElement();
851852
mShowGridAnnotation = ( annotationElem.attribute( "show", "0" ) != "0" );
853+
mGridAnnotationFormat = QgsComposerMap::GridAnnotationFormat( annotationElem.attribute( "format", "0" ).toInt() );
852854
mLeftGridAnnotationPosition = QgsComposerMap::GridAnnotationPosition( annotationElem.attribute( "leftPosition", "0" ).toInt() );
853855
mRightGridAnnotationPosition = QgsComposerMap::GridAnnotationPosition( annotationElem.attribute( "rightPosition", "0" ).toInt() );
854856
mTopGridAnnotationPosition = QgsComposerMap::GridAnnotationPosition( annotationElem.attribute( "topPosition", "0" ).toInt() );

0 commit comments

Comments
 (0)