Skip to content
Permalink
Browse files

[bugfix]Remember the c++ plugins folder in Options dialog

and enable the remove button
  • Loading branch information
DelazJ committed Nov 4, 2017
1 parent 33d422b commit 9e27362b30d70043b6b60afdb0a38ae94801d4b9
Showing with 10 additions and 6 deletions.
  1. +10 −6 src/app/qgsoptions.cpp
@@ -255,14 +255,18 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti

//local directories to search when loading c++ plugins
QStringList pathList = mSettings->value( QStringLiteral( "plugins/searchPathsForPlugins" ) ).toStringList();
Q_FOREACH ( const QString &path, pathList )
if ( !pathList.isEmpty() )
{
QListWidgetItem *newItem = new QListWidgetItem( mListPluginPaths );
newItem->setText( path );
newItem->setFlags( Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable );
mListPluginPaths->addItem( newItem );
Q_FOREACH ( const QString &path, pathList )
{
QListWidgetItem *newItem = new QListWidgetItem( mListPluginPaths );
newItem->setText( path );
newItem->setFlags( Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable );
mListPluginPaths->addItem( newItem );
}
}
connect( mBtnAddPluginPath, &QAbstractButton::clicked, this, &QgsOptions::addPluginPath );
connect( mBtnRemovePluginPath, &QAbstractButton::clicked, this, &QgsOptions::removePluginPath );

//local directories to search when looking for an SVG with a given basename
pathList = QgsApplication::svgPaths();
@@ -1181,7 +1185,7 @@ void QgsOptions::saveOptions()
{
pathsList << mListPluginPaths->item( i )->text();
}
mSettings->setValue( QStringLiteral( "help/helpSearchPath" ), pathsList );
mSettings->setValue( QStringLiteral( "plugins/searchPathsForPlugins" ), pathsList );

//search directories for svgs
pathsList.clear();

0 comments on commit 9e27362

Please sign in to comment.
You can’t perform that action at this time.