[QGIS Commit] r11785 - trunk/qgis/src/core/symbology

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Oct 9 12:01:57 EDT 2009


Author: jef
Date: 2009-10-09 12:01:57 -0400 (Fri, 09 Oct 2009)
New Revision: 11785

Modified:
   trunk/qgis/src/core/symbology/qgssymbol.cpp
Log:
also support relative paths for textures

Modified: trunk/qgis/src/core/symbology/qgssymbol.cpp
===================================================================
--- trunk/qgis/src/core/symbology/qgssymbol.cpp	2009-10-09 13:06:15 UTC (rev 11784)
+++ trunk/qgis/src/core/symbology/qgssymbol.cpp	2009-10-09 16:01:57 UTC (rev 11785)
@@ -548,7 +548,7 @@
   symbol.appendChild( fillcolor );
 
   appendText( symbol, document, "fillpattern", QgsSymbologyUtils::brushStyle2QString( mBrush.style() ) );
-  appendText( symbol, document, "texturepath", mTextureFilePath );
+  appendText( symbol, document, "texturepath", QgsProject::instance()->writePath( mTextureFilePath ) );
 
   return returnval;
 }
@@ -668,7 +668,7 @@
 
   QDomNode texturepathnode = synode.namedItem( "texturepath" );
   QDomElement texturepathelement = texturepathnode.toElement();
-  setCustomTexture( texturepathelement.text() );
+  setCustomTexture( QgsProject::instance()->readPath( texturepathelement.text() ) );
 
   //run this after setting the custom texture path, so we override the brush if it isn't the custom pattern brush.
   QDomNode fillpnode = synode.namedItem( "fillpattern" );



More information about the QGIS-commit mailing list