Skip to content
Permalink
Browse files

Merge pull request #35219 from mhugent/fix_absolute_path_qlr

Fix absolute paths in qlr export (bug #27497)
  • Loading branch information
mhugent committed Mar 22, 2020
2 parents 2c01373 + 132e674 commit f7d09d9ee9be99e86177863cb909eb653a26f815
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/qgslayerdefinition.cpp
@@ -210,7 +210,8 @@ bool QgsLayerDefinition::exportLayerDefinition( QString path, const QList<QgsLay
}

QgsReadWriteContext context;
context.setPathResolver( QgsPathResolver( path ) );
bool writeAbsolutePath = QgsProject::instance()->readBoolEntry( QStringLiteral( "Paths" ), QStringLiteral( "/Absolute" ), false );
context.setPathResolver( QgsPathResolver( writeAbsolutePath ? QString() : path ) );

QDomDocument doc( QStringLiteral( "qgis-layer-definition" ) );
if ( !exportLayerDefinition( doc, selectedTreeNodes, errorMessage, context ) )

0 comments on commit f7d09d9

Please sign in to comment.
You can’t perform that action at this time.