Skip to content

Commit 16e872f

Browse files
committedJun 20, 2011
Fix bug in case of embeding from other projects with relative path
1 parent fdb41a6 commit 16e872f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/app/legend/qgslegend.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ bool QgsLegend::writeXML( QList<QTreeWidgetItem *> items, QDomNode &node, QDomDo
10551055
if ( embedIt != mEmbeddedGroups.constEnd() )
10561056
{
10571057
legendgroupnode.setAttribute( "embedded", 1 );
1058-
legendgroupnode.setAttribute( "project", embedIt.value() );
1058+
legendgroupnode.setAttribute( "project", QgsProject::instance()->writePath( embedIt.value() ) );
10591059
}
10601060
else
10611061
{
@@ -1174,7 +1174,7 @@ bool QgsLegend::readXML( QgsLegendGroup *parent, const QDomNode &node )
11741174
QgsLegendGroup* theGroup = 0;
11751175
if ( childelem.attribute( "embedded" ) == "1" )
11761176
{
1177-
theGroup = addEmbeddedGroup( name, childelem.attribute( "project" ) );
1177+
theGroup = addEmbeddedGroup( name, QgsProject::instance()->readPath( childelem.attribute( "project" ) ) );
11781178
}
11791179
else
11801180
{

0 commit comments

Comments
 (0)
Please sign in to comment.