Skip to content

Commit

Permalink
Merge pull request #7119 from rldhont/symbol-utils-symbolNameToPath-p…
Browse files Browse the repository at this point in the history
…rojectRelativePath

[SymbolLayerUtils] Using QgsProject::readPath to resolve relative path in symbolNameToPath
  • Loading branch information
rldhont committed Jun 14, 2018
2 parents ade01f5 + 974b9f3 commit 247836b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/symbology-ng/qgssymbollayerv2utils.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 247836b

Please sign in to comment.