Skip to content

Commit

Permalink
Save path for svg texture absolute or relative
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12807 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jan 20, 2010
1 parent 28ba4f6 commit 4482bec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/symbology-ng/qgsfillsymbollayerv2.cpp
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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() )
Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit 4482bec

Please sign in to comment.