Skip to content
Permalink
Browse files

Fix absolute paths in qlr export (bug #27497)

  • Loading branch information
mhugent committed Mar 20, 2020
1 parent 7b7c806 commit db74e4517eabada365b3dad44627c008739a7b8d
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 ? QStringLiteral( "" ) : path ) );

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

0 comments on commit db74e45

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