Skip to content

Commit

Permalink
Fix SVG preview blocks QGIS (fix #14255)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
nyalldawson committed Oct 6, 2016
1 parent 20992f0 commit ffafafd
Show file tree
Hide file tree
Showing 6 changed files with 466 additions and 217 deletions.
16 changes: 14 additions & 2 deletions src/core/qgsapplication.cpp
Expand Up @@ -712,8 +712,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 ffafafd

Please sign in to comment.