Skip to content
Permalink
Browse files

Merge pull request #7119 from rldhont/symbol-utils-symbolNameToPath-p…

…rojectRelativePath

[SymbolLayerUtils] Using QgsProject::readPath to resolve relative path in symbolNameToPath
  • Loading branch information
rldhont committed Jun 14, 2018
2 parents ade01f5 + 974b9f3 commit 247836bd641426ff1eaab0289fb168e7c3a94a04
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 247836b

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