Skip to content
Permalink
Browse files
annotation items: save coordinates using qgsDoubleToString instead of…
… QString::number (fixes #11883)
  • Loading branch information
jef-n committed Dec 18, 2014
1 parent c800a8c commit f81d48368765a54ac2a5191326210b993f43fdfa
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/gui/qgsannotationitem.cpp
@@ -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() );

0 comments on commit f81d483

Please sign in to comment.