Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 9e27362
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/app/qgsoptions.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 9e27362

Please sign in to comment.