Skip to content

Commit

Permalink
prevent duplication of SVG path (fix #16056)
Browse files Browse the repository at this point in the history
(partially cherry-picked from c60c4f7)
  • Loading branch information
alexbruy committed Jan 18, 2017
1 parent f4d9514 commit 538b7c9
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 @@ -702,8 +702,20 @@ QStringList QgsApplication::svgPaths()
myPathList = myPaths.split( '|' );
}

myPathList << ABISYM( mDefaultSvgPaths );
return myPathList;
// 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 538b7c9

Please sign in to comment.