Skip to content

Commit

Permalink
Fix resolving localized paths with sublayer selection suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Jun 22, 2021
1 parent 6f0bac4 commit 8c94858
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/core/qgspathresolver.cpp
Expand Up @@ -54,8 +54,17 @@ QString QgsPathResolver::readPath( const QString &f ) const

if ( src.startsWith( QLatin1String( "localized:" ) ) )
{
QStringList parts = src.split( "|" );
// strip away "localized:" prefix, replace with actual inbuilt data folder path
return QgsApplication::localizedDataPathRegistry()->globalPath( src.mid( 10 ) ) ;
parts[0] = QgsApplication::localizedDataPathRegistry()->globalPath( parts[0].mid( 10 ) ) ;
if ( !parts[0].isEmpty() )
{
return parts.join( "|" );
}
else
{
return QString();
}
}
if ( src.startsWith( QLatin1String( "attachment:" ) ) )
{
Expand Down

0 comments on commit 8c94858

Please sign in to comment.