Skip to content

Commit bb2450e

Browse files
committedOct 6, 2016
Fix SVG preview blocks QGIS (fix #14255)
Now SVG preview loading occurs in a background thread so that dialogs can open instantly Also guard against circular symbolic links in SVG selector widget (cherry-picked from c60c4f7)
1 parent 971b413 commit bb2450e

File tree

6 files changed

+466
-217
lines changed

6 files changed

+466
-217
lines changed
 

‎src/core/qgsapplication.cpp

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

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

719731
/*!

0 commit comments

Comments
 (0)