Skip to content

Commit

Permalink
Search also in root dirs of svg search paths
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11845 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Oct 26, 2009
1 parent e8b1b6e commit 1df64b6
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/core/symbology/qgsmarkercatalogue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,20 @@ void QgsMarkerCatalogue::refreshList()
// TODO recursive ?
QDir dir( svgPaths[i] );

//
// First check the root dir of this path for svgs
//
QStringList dl1 = dir.entryList( QStringList( "*.svg" ), QDir::Files );
for ( QStringList::iterator it1 = dl1.begin(); it1 != dl1.end(); ++it1 )
{
// TODO test if it is correct SVG
mList.append( "svg:" + dir.path() + "/" + *it1 );
}

//
// Now check in any nested dirs for svgs
//
QStringList dl = dir.entryList( QDir::Dirs );

for ( QStringList::iterator it = dl.begin(); it != dl.end(); ++it )
{
QgsDebugMsg( QString( "Looking for svgs in %1" ).arg( svgPaths[i] + *it ) );
Expand Down

0 comments on commit 1df64b6

Please sign in to comment.