Skip to content

Commit

Permalink
annotation items: save coordinates using qgsDoubleToString instead of…
Browse files Browse the repository at this point in the history
… QString::number (fixes #11883)
  • Loading branch information
jef-n committed Dec 18, 2014
1 parent c800a8c commit f81d483
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/gui/qgsannotationitem.cpp
Expand Up @@ -386,15 +386,15 @@ void QgsAnnotationItem::_writeXML( QDomDocument& doc, QDomElement& itemElem ) co
}
QDomElement annotationElem = doc.createElement( "AnnotationItem" );
annotationElem.setAttribute( "mapPositionFixed", mMapPositionFixed );
annotationElem.setAttribute( "mapPosX", QString::number( mMapPosition.x() ) );
annotationElem.setAttribute( "mapPosY", QString::number( mMapPosition.y() ) );
annotationElem.setAttribute( "offsetX", QString::number( mOffsetFromReferencePoint.x() ) );
annotationElem.setAttribute( "offsetY", QString::number( mOffsetFromReferencePoint.y() ) );
annotationElem.setAttribute( "mapPosX", qgsDoubleToString( mMapPosition.x() ) );
annotationElem.setAttribute( "mapPosY", qgsDoubleToString( mMapPosition.y() ) );
annotationElem.setAttribute( "offsetX", qgsDoubleToString( mOffsetFromReferencePoint.x() ) );
annotationElem.setAttribute( "offsetY", qgsDoubleToString( mOffsetFromReferencePoint.y() ) );
annotationElem.setAttribute( "frameWidth", QString::number( mFrameSize.width() ) );
annotationElem.setAttribute( "frameHeight", QString::number( mFrameSize.height() ) );
QPointF canvasPos = pos();
annotationElem.setAttribute( "canvasPosX", QString::number( canvasPos.x() ) );
annotationElem.setAttribute( "canvasPosY", QString::number( canvasPos.y() ) );
annotationElem.setAttribute( "canvasPosX", qgsDoubleToString( canvasPos.x() ) );
annotationElem.setAttribute( "canvasPosY", qgsDoubleToString( canvasPos.y() ) );
annotationElem.setAttribute( "frameBorderWidth", QString::number( mFrameBorderWidth ) );
annotationElem.setAttribute( "frameColor", mFrameColor.name() );
annotationElem.setAttribute( "frameColorAlpha", mFrameColor.alpha() );
Expand Down

0 comments on commit f81d483

Please sign in to comment.