Skip to content

Commit 149b24c

Browse files
committedNov 14, 2012
#2781 Relative paths to SvgMarker doesn't work in new symbology
1 parent 0ddc034 commit 149b24c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎src/core/symbology-ng/qgsmarkersymbollayerv2.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,18 +894,23 @@ QString QgsSvgMarkerSymbolLayerV2::symbolPathToName( QString path )
894894

895895
QStringList svgPaths = QgsApplication::svgPaths();
896896

897+
bool isInSvgPathes = false;
897898
for ( int i = 0; i < svgPaths.size(); i++ )
898899
{
899900
QString dir = QFileInfo( svgPaths[i] ).canonicalFilePath();
900901

901902
if ( !dir.isEmpty() && path.startsWith( dir ) )
902903
{
903904
path = path.mid( dir.size() );
905+
isInSvgPathes = true;
904906
break;
905907
}
906908
}
907909

908-
return path;
910+
if ( isInSvgPathes )
911+
return path;
912+
913+
return QgsProject::instance()->writePath( path );
909914
}
910915

911916

0 commit comments

Comments
 (0)
Please sign in to comment.