We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 9298050 commit 771288eCopy full SHA for 771288e
src/app/qgsbookmarks.cpp
@@ -387,8 +387,17 @@ void QgsBookmarks::exportToXml()
387
if ( idx.isValid() )
388
{
389
QString value = idx.data( Qt::DisplayRole ).toString();
390
- QDomText idText = doc.createTextNode( value );
391
QString header = headerList.at( j );
+ // 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 );
401
QDomElement id = doc.createElement( header );
402
id.appendChild( idText );
403
bookmark.appendChild( id );
0 commit comments