Skip to content

Commit

Permalink
[SymbolLayerUtils] Using QgsProject::readPath to resolve relative pat…
Browse files Browse the repository at this point in the history
…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 974b9f3
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 974b9f3

Please sign in to comment.