Skip to content

Commit 771288e

Browse files
committedJan 8, 2018
fix export
1 parent 9298050 commit 771288e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed
 

‎src/app/qgsbookmarks.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,17 @@ void QgsBookmarks::exportToXml()
387387
if ( idx.isValid() )
388388
{
389389
QString value = idx.data( Qt::DisplayRole ).toString();
390-
QDomText idText = doc.createTextNode( value );
391390
QString header = headerList.at( j );
391+
// If it's the EPSG code, convert it to internal srid
392+
if ( header == QStringLiteral( "sr_id" ) )
393+
{
394+
QgsCoordinateReferenceSystem crs;
395+
if ( crs.createFromOgcWmsCrs( value ) )
396+
value = QString::number( crs.srsid( ) );
397+
else
398+
value = QString();
399+
}
400+
QDomText idText = doc.createTextNode( value );
392401
QDomElement id = doc.createElement( header );
393402
id.appendChild( idText );
394403
bookmark.appendChild( id );

0 commit comments

Comments
 (0)
Please sign in to comment.