Skip to content

Commit

Permalink
Avoid duplicate SVG paths
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@15613 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Mar 27, 2011
1 parent b4fc660 commit ace914d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/qgsapplication.cpp
Expand Up @@ -74,7 +74,6 @@ QgsApplication::QgsApplication( int & argc, char ** argv, bool GUIenabled, QStri
mConfigPath = customConfigPath + "/"; // make sure trailing slash is included
}

mDefaultSvgPaths << mPkgDataPath + QString( "/svg/" );
mDefaultSvgPaths << qgisSettingsDirPath() + QString( "svg/" );
}

Expand Down Expand Up @@ -174,7 +173,10 @@ void QgsApplication::setPluginPath( const QString thePluginPath )
void QgsApplication::setPkgDataPath( const QString thePkgDataPath )
{
mPkgDataPath = thePkgDataPath;
mDefaultSvgPaths << mPkgDataPath + QString( "/svg/" );
QString svgPath = mPkgDataPath + QString( "/svg/" );
// avoid duplicate entries
if ( !mDefaultSvgPaths.contains( svgPath ) )
mDefaultSvgPaths << svgPath;
}

void QgsApplication::setDefaultSvgPaths( const QStringList& pathList )
Expand Down

0 comments on commit ace914d

Please sign in to comment.