File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ QgsSymbolLayerV2* QgsSimpleFillSymbolLayerV2::clone() const
86
86
// QgsSVGFillSymbolLayer
87
87
#include < QFile>
88
88
#include < QSvgRenderer>
89
+ #include " qgsproject.h" // for absolute/relative file paths
89
90
90
91
QgsSVGFillSymbolLayer::QgsSVGFillSymbolLayer ( const QString& svgFilePath, double width ): mPatternWidth( width ), mOutline( 0 )
91
92
{
@@ -130,7 +131,7 @@ QgsSymbolLayerV2* QgsSVGFillSymbolLayer::create( const QgsStringMap& properties
130
131
}
131
132
if ( properties.contains ( " svgFile" ) )
132
133
{
133
- svgFilePath = properties[" svgFile" ];
134
+ svgFilePath = QgsProject::instance ()-> readPath ( properties[" svgFile" ] ) ;
134
135
}
135
136
136
137
if ( !svgFilePath.isEmpty () )
@@ -224,7 +225,7 @@ QgsStringMap QgsSVGFillSymbolLayer::properties() const
224
225
QgsStringMap map;
225
226
if ( !mSvgFilePath .isEmpty () )
226
227
{
227
- map.insert ( " svgFile" , mSvgFilePath );
228
+ map.insert ( " svgFile" , QgsProject::instance ()-> writePath ( mSvgFilePath ) );
228
229
}
229
230
else
230
231
{
You can’t perform that action at this time.
0 commit comments