Skip to content

Commit 2d3dd01

Browse files
author
jef
committed
also support relative paths for textures
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11785 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 5920feb commit 2d3dd01

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/core/symbology/qgssymbol.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ bool QgsSymbol::writeXML( QDomNode & item, QDomDocument & document, const QgsVec
548548
symbol.appendChild( fillcolor );
549549

550550
appendText( symbol, document, "fillpattern", QgsSymbologyUtils::brushStyle2QString( mBrush.style() ) );
551-
appendText( symbol, document, "texturepath", mTextureFilePath );
551+
appendText( symbol, document, "texturepath", QgsProject::instance()->writePath( mTextureFilePath ) );
552552

553553
return returnval;
554554
}
@@ -668,7 +668,7 @@ bool QgsSymbol::readXML( QDomNode &synode, const QgsVectorLayer *vl )
668668

669669
QDomNode texturepathnode = synode.namedItem( "texturepath" );
670670
QDomElement texturepathelement = texturepathnode.toElement();
671-
setCustomTexture( texturepathelement.text() );
671+
setCustomTexture( QgsProject::instance()->readPath( texturepathelement.text() ) );
672672

673673
//run this after setting the custom texture path, so we override the brush if it isn't the custom pattern brush.
674674
QDomNode fillpnode = synode.namedItem( "fillpattern" );

0 commit comments

Comments
 (0)