Skip to content

Commit

Permalink
[layertree] Fix #10373 (embedded group not loaded if with relative path)
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed May 27, 2014
1 parent df09910 commit 48ee84b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/qgsproject.cpp
Expand Up @@ -966,7 +966,11 @@ void QgsProject::loadEmbeddedNodes( QgsLayerTreeGroup* group )
QgsLayerTreeGroup* childGroup = QgsLayerTree::toGroup( child );
if ( childGroup->customProperty( "embedded" ).toInt() )
{
QgsLayerTreeGroup* newGroup = createEmbeddedGroup( childGroup->name(), childGroup->customProperty( "embedded_project" ).toString() );
// make sure to convert the path from relative to absolute
QString projectPath = readPath( childGroup->customProperty( "embedded_project" ).toString() );
childGroup->setCustomProperty( "embedded_project", projectPath );

QgsLayerTreeGroup* newGroup = createEmbeddedGroup( childGroup->name(), projectPath );
if ( newGroup )
{
QList<QgsLayerTreeNode*> clonedChildren;
Expand Down

0 comments on commit 48ee84b

Please sign in to comment.