Skip to content

Commit

Permalink
Fix bug in case of embeding from other projects with relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jun 20, 2011
1 parent fdb41a6 commit 16e872f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/legend/qgslegend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ bool QgsLegend::writeXML( QList<QTreeWidgetItem *> items, QDomNode &node, QDomDo
if ( embedIt != mEmbeddedGroups.constEnd() )
{
legendgroupnode.setAttribute( "embedded", 1 );
legendgroupnode.setAttribute( "project", embedIt.value() );
legendgroupnode.setAttribute( "project", QgsProject::instance()->writePath( embedIt.value() ) );
}
else
{
Expand Down Expand Up @@ -1174,7 +1174,7 @@ bool QgsLegend::readXML( QgsLegendGroup *parent, const QDomNode &node )
QgsLegendGroup* theGroup = 0;
if ( childelem.attribute( "embedded" ) == "1" )
{
theGroup = addEmbeddedGroup( name, childelem.attribute( "project" ) );
theGroup = addEmbeddedGroup( name, QgsProject::instance()->readPath( childelem.attribute( "project" ) ) );
}
else
{
Expand Down

0 comments on commit 16e872f

Please sign in to comment.