@@ -121,7 +121,6 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
121
121
mCustomVariablesTable ->setEnabled ( false );
122
122
}
123
123
QStringList customVarsList = settings.value ( " qgis/customEnvVars" , " " ).toStringList ();
124
- mCustomVariablesTable ->clearContents ();
125
124
foreach ( const QString &varStr, customVarsList )
126
125
{
127
126
int pos = varStr.indexOf ( QLatin1Char ( ' |' ) );
@@ -155,7 +154,6 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
155
154
mCurrentVariablesTable ->horizontalHeader ()->setFixedHeight ( fmCustomVarH );
156
155
QMap<QString, QString> sysVarsMap = QgsApplication::systemEnvVars ();
157
156
QStringList currentVarsList = QProcess::systemEnvironment ();
158
- mCurrentVariablesTable ->clearContents ();
159
157
160
158
foreach ( const QString &varStr, currentVarsList )
161
159
{
@@ -1368,6 +1366,28 @@ void QgsOptions::on_mRemoveCustomVarBtn_clicked()
1368
1366
mCustomVariablesTable ->removeRow ( mCustomVariablesTable ->currentRow () );
1369
1367
}
1370
1368
1369
+ void QgsOptions::on_mCurrentVariablesQGISChxBx_toggled ( bool qgisSpecific )
1370
+ {
1371
+ for ( int i = mCurrentVariablesTable ->rowCount () - 1 ; i >= 0 ; --i )
1372
+ {
1373
+ if ( qgisSpecific )
1374
+ {
1375
+ QString itmTxt = mCurrentVariablesTable ->item ( i, 0 )->text ();
1376
+ if ( !itmTxt.startsWith ( " QGIS" , Qt::CaseInsensitive ) )
1377
+ mCurrentVariablesTable ->hideRow ( i );
1378
+ }
1379
+ else
1380
+ {
1381
+ mCurrentVariablesTable ->showRow ( i );
1382
+ }
1383
+ }
1384
+ if ( mCurrentVariablesTable ->rowCount () > 0 )
1385
+ {
1386
+ mCurrentVariablesTable ->sortByColumn ( 0 , Qt::AscendingOrder );
1387
+ mCurrentVariablesTable ->resizeColumnToContents ( 0 );
1388
+ }
1389
+ }
1390
+
1371
1391
void QgsOptions::on_mBtnAddPluginPath_clicked ()
1372
1392
{
1373
1393
QString myDir = QFileDialog::getExistingDirectory (
0 commit comments