Skip to content

Commit 6dd1b5e

Browse files
author
timlinux
committed
Search also in root dirs of svg search paths
git-svn-id: http://svn.osgeo.org/qgis/trunk@11845 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3ade394 commit 6dd1b5e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/core/symbology/qgsmarkercatalogue.cpp

+12-1
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,20 @@ void QgsMarkerCatalogue::refreshList()
7777
// TODO recursive ?
7878
QDir dir( svgPaths[i] );
7979

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

90+
//
91+
// Now check in any nested dirs for svgs
92+
//
8193
QStringList dl = dir.entryList( QDir::Dirs );
82-
8394
for ( QStringList::iterator it = dl.begin(); it != dl.end(); ++it )
8495
{
8596
QgsDebugMsg( QString( "Looking for svgs in %1" ).arg( svgPaths[i] + *it ) );

0 commit comments

Comments
 (0)