Skip to content

Commit 0b68363

Browse files
authoredOct 4, 2016
Merge pull request #3565 from nyalldawson/svg_background
Fix SVG preview blocks QGIS (fix #14255)
2 parents 7332dda + 3abded3 commit 0b68363

File tree

6 files changed

+474
-224
lines changed

6 files changed

+474
-224
lines changed
 

‎src/core/qgsapplication.cpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,20 @@ QStringList QgsApplication::svgPaths()
714714
myPathList = myPaths.split( '|' );
715715
}
716716

717-
myPathList << ABISYM( mDefaultSvgPaths );
718-
return myPathList;
717+
// maintain user set order while stripping duplicates
718+
QStringList paths;
719+
Q_FOREACH ( const QString& path, myPathList )
720+
{
721+
if ( !paths.contains( path ) )
722+
paths.append( path );
723+
}
724+
Q_FOREACH ( const QString& path, ABISYM( mDefaultSvgPaths ) )
725+
{
726+
if ( !paths.contains( path ) )
727+
paths.append( path );
728+
}
729+
730+
return paths;
719731
}
720732

721733
/*!

0 commit comments

Comments
 (0)