Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
#2781 Relative paths to SvgMarker doesn't work in new symbology
  • Loading branch information
rldhont committed Nov 14, 2012
1 parent 0ddc034 commit 149b24c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
Expand Up @@ -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 );
}


Expand Down

0 comments on commit 149b24c

Please sign in to comment.