Skip to content

Commit

Permalink
fix export
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenmizuno committed Jan 8, 2018
1 parent 9298050 commit 771288e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/app/qgsbookmarks.cpp
Expand Up @@ -387,8 +387,17 @@ void QgsBookmarks::exportToXml()
if ( idx.isValid() )
{
QString value = idx.data( Qt::DisplayRole ).toString();
QDomText idText = doc.createTextNode( value );
QString header = headerList.at( j );
// If it's the EPSG code, convert it to internal srid
if ( header == QStringLiteral( "sr_id" ) )
{
QgsCoordinateReferenceSystem crs;
if ( crs.createFromOgcWmsCrs( value ) )
value = QString::number( crs.srsid( ) );
else
value = QString();
}
QDomText idText = doc.createTextNode( value );
QDomElement id = doc.createElement( header );
id.appendChild( idText );
bookmark.appendChild( id );
Expand Down

0 comments on commit 771288e

Please sign in to comment.