Skip to content
Permalink
Browse files

#2781 Relative paths to SvgMarker doesn't work in new symbology

  • Loading branch information
rldhont committed Nov 14, 2012
1 parent 0ddc034 commit 149b24c07f058c8dc8d56cad370f522ca31196f7
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
@@ -894,18 +894,23 @@ QString QgsSvgMarkerSymbolLayerV2::symbolPathToName( QString path )

QStringList svgPaths = QgsApplication::svgPaths();

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

if ( !dir.isEmpty() && path.startsWith( dir ) )
{
path = path.mid( dir.size() );
isInSvgPathes = true;
break;
}
}

return path;
if ( isInSvgPathes )
return path;

return QgsProject::instance()->writePath( path );
}


0 comments on commit 149b24c

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