[QGIS Commit] r12807 - trunk/qgis/src/core/symbology-ng
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Jan 20 15:00:57 EST 2010
Author: mhugent
Date: 2010-01-20 15:00:56 -0500 (Wed, 20 Jan 2010)
New Revision: 12807
Modified:
trunk/qgis/src/core/symbology-ng/qgsfillsymbollayerv2.cpp
Log:
Save path for svg texture absolute or relative
Modified: trunk/qgis/src/core/symbology-ng/qgsfillsymbollayerv2.cpp
===================================================================
--- trunk/qgis/src/core/symbology-ng/qgsfillsymbollayerv2.cpp 2010-01-20 18:33:19 UTC (rev 12806)
+++ trunk/qgis/src/core/symbology-ng/qgsfillsymbollayerv2.cpp 2010-01-20 20:00:56 UTC (rev 12807)
@@ -86,6 +86,7 @@
//QgsSVGFillSymbolLayer
#include <QFile>
#include <QSvgRenderer>
+#include "qgsproject.h" //for absolute/relative file paths
QgsSVGFillSymbolLayer::QgsSVGFillSymbolLayer( const QString& svgFilePath, double width ): mPatternWidth( width ), mOutline( 0 )
{
@@ -130,7 +131,7 @@
}
if ( properties.contains( "svgFile" ) )
{
- svgFilePath = properties["svgFile"];
+ svgFilePath = QgsProject::instance()->readPath( properties["svgFile"] );
}
if ( !svgFilePath.isEmpty() )
@@ -224,7 +225,7 @@
QgsStringMap map;
if ( !mSvgFilePath.isEmpty() )
{
- map.insert( "svgFile", mSvgFilePath );
+ map.insert( "svgFile", QgsProject::instance()->writePath( mSvgFilePath ) );
}
else
{
More information about the QGIS-commit
mailing list