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
8686// QgsSVGFillSymbolLayer
8787#include < QFile>
8888#include < QSvgRenderer>
89+ #include " qgsproject.h" // for absolute/relative file paths
8990
9091QgsSVGFillSymbolLayer::QgsSVGFillSymbolLayer ( const QString& svgFilePath, double width ): mPatternWidth( width ), mOutline( 0 )
9192{
@@ -130,7 +131,7 @@ QgsSymbolLayerV2* QgsSVGFillSymbolLayer::create( const QgsStringMap& properties
130131 }
131132 if ( properties.contains ( " svgFile" ) )
132133 {
133- svgFilePath = properties[" svgFile" ];
134+ svgFilePath = QgsProject::instance ()-> readPath ( properties[" svgFile" ] ) ;
134135 }
135136
136137 if ( !svgFilePath.isEmpty () )
@@ -224,7 +225,7 @@ QgsStringMap QgsSVGFillSymbolLayer::properties() const
224225 QgsStringMap map;
225226 if ( !mSvgFilePath .isEmpty () )
226227 {
227- map.insert ( " svgFile" , mSvgFilePath );
228+ map.insert ( " svgFile" , QgsProject::instance ()-> writePath ( mSvgFilePath ) );
228229 }
229230 else
230231 {
You can’t perform that action at this time.
0 commit comments