Skip to content

Commit

Permalink
Keep the user set order for svg paths
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 4, 2016
1 parent a2166bd commit 3abded3
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/core/qgsapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,20 @@ QStringList QgsApplication::svgPaths()
myPathList = myPaths.split( '|' );
}

myPathList << ABISYM( mDefaultSvgPaths );
return myPathList.toSet().toList();
// maintain user set order while stripping duplicates
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;
}

/*!
Expand Down

0 comments on commit 3abded3

Please sign in to comment.