Skip to content
Permalink
Browse files

[SymbolLayerUtils] Using QgsProject::readPath to resolve relative pat…

…h in symbolNameToPath

In `QgsSymbolLayerV2Utils::symbolNameToPath` the resolution of relative path to
project was nos based on `QgsProject::readPath` method.
  • Loading branch information
rldhont committed May 30, 2018
1 parent 7160bac commit 974b9f371d7a76bc81afca2dcda8fab4bfbe8134
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/core/symbology-ng/qgssymbollayerv2utils.cpp
@@ -3807,9 +3807,8 @@ QString QgsSymbolLayerV2Utils::symbolNameToPath( QString name )
}
}

QFileInfo pfi( QgsProject::instance()->fileName() );
QString alternatePath = pfi.canonicalPath() + QDir::separator() + name;
if ( pfi.exists() && QFile( alternatePath ).exists() )
QString alternatePath = QgsProject::instance()->readPath( name );
if ( QFile( alternatePath ).exists() )
{
QgsDebugMsg( "Svg found in alternative path" );
return QFileInfo( alternatePath ).canonicalFilePath();

0 comments on commit 974b9f3

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