Skip to content

Commit 247836b

Browse files
authored
Merge pull request #7119 from rldhont/symbol-utils-symbolNameToPath-projectRelativePath
[SymbolLayerUtils] Using QgsProject::readPath to resolve relative path in symbolNameToPath
2 parents ade01f5 + 974b9f3 commit 247836b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/core/symbology-ng/qgssymbollayerv2utils.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -3807,9 +3807,8 @@ QString QgsSymbolLayerV2Utils::symbolNameToPath( QString name )
38073807
}
38083808
}
38093809

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

0 commit comments

Comments
 (0)