Skip to content

Commit 2248749

Browse files
author
wonder
committed
Avoid duplicate SVG paths
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15613 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6d8ed98 commit 2248749

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/core/qgsapplication.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ QgsApplication::QgsApplication( int & argc, char ** argv, bool GUIenabled, QStri
7474
mConfigPath = customConfigPath + "/"; // make sure trailing slash is included
7575
}
7676

77-
mDefaultSvgPaths << mPkgDataPath + QString( "/svg/" );
7877
mDefaultSvgPaths << qgisSettingsDirPath() + QString( "svg/" );
7978
}
8079

@@ -174,7 +173,10 @@ void QgsApplication::setPluginPath( const QString thePluginPath )
174173
void QgsApplication::setPkgDataPath( const QString thePkgDataPath )
175174
{
176175
mPkgDataPath = thePkgDataPath;
177-
mDefaultSvgPaths << mPkgDataPath + QString( "/svg/" );
176+
QString svgPath = mPkgDataPath + QString( "/svg/" );
177+
// avoid duplicate entries
178+
if ( !mDefaultSvgPaths.contains( svgPath ) )
179+
mDefaultSvgPaths << svgPath;
178180
}
179181

180182
void QgsApplication::setDefaultSvgPaths( const QStringList& pathList )

0 commit comments

Comments
 (0)