Keep the user set order for svg paths

This commit is contained in:
Nyall Dawson 2016-10-04 15:45:17 +10:00
parent a2166bd042
commit 3abded3186

View File

@ -714,8 +714,20 @@ QStringList QgsApplication::svgPaths()
myPathList = myPaths.split( '|' ); myPathList = myPaths.split( '|' );
} }
myPathList << ABISYM( mDefaultSvgPaths ); // maintain user set order while stripping duplicates
return myPathList.toSet().toList(); QStringList paths;
Q_FOREACH ( const QString& path, myPathList )
{
if ( !paths.contains( path ) )
paths.append( path );
}
Q_FOREACH ( const QString& path, ABISYM( mDefaultSvgPaths ) )
{
if ( !paths.contains( path ) )
paths.append( path );
}
return paths;
} }
/*! /*!