Skip to content
Permalink
Browse files

prevent duplication of SVG path (fix #16056)

(partially cherry-picked from c60c4f7)
  • Loading branch information
alexbruy committed Jan 18, 2017
1 parent f4d9514 commit 538b7c90077a2c676676bf437799e7ecb34ddf3b
Showing with 14 additions and 2 deletions.
  1. +14 −2 src/core/qgsapplication.cpp
@@ -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;
}

/*!

0 comments on commit 538b7c9

Please sign in to comment.
You can’t perform that action at this time.