Skip to content
Permalink
Browse files

Save path for svg texture absolute or relative

git-svn-id: http://svn.osgeo.org/qgis/trunk@12807 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Jan 20, 2010
1 parent 28ba4f6 commit 4482bec37d41d3933a3c04415293cbecd2893a74
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/core/symbology-ng/qgsfillsymbollayerv2.cpp
@@ -86,6 +86,7 @@ QgsSymbolLayerV2* QgsSimpleFillSymbolLayerV2::clone() const
//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 @@ QgsSymbolLayerV2* QgsSVGFillSymbolLayer::create( const QgsStringMap& properties
}
if ( properties.contains( "svgFile" ) )
{
svgFilePath = properties["svgFile"];
svgFilePath = QgsProject::instance()->readPath( properties["svgFile"] );
}

if ( !svgFilePath.isEmpty() )
@@ -224,7 +225,7 @@ QgsStringMap QgsSVGFillSymbolLayer::properties() const
QgsStringMap map;
if ( !mSvgFilePath.isEmpty() )
{
map.insert( "svgFile", mSvgFilePath );
map.insert( "svgFile", QgsProject::instance()->writePath( mSvgFilePath ) );
}
else
{

0 comments on commit 4482bec

Please sign in to comment.
You can’t perform that action at this time.