Skip to content
Permalink
Browse files

Merge pull request #35240 from mhugent/fix_absolute_path_qlr_3_10

Backport 3.10 Fix absolute paths in qlr export
  • Loading branch information
m-kuhn committed Mar 24, 2020
2 parents 17ae82d + c65d243 commit b897533a6cf88236c8fee04377ee2310c374d49b
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 b897533

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