@@ -68,7 +68,6 @@ QgsPluginManager::QgsPluginManager( QWidget *parent, bool pluginsAreEnabled, Qt:
68
68
mPythonUtils = nullptr ;
69
69
70
70
setupUi ( this );
71
- connect ( vwPlugins, &QListView::clicked, this , &QgsPluginManager::vwPlugins_clicked );
72
71
connect ( vwPlugins, &QListView::doubleClicked, this , &QgsPluginManager::vwPlugins_doubleClicked );
73
72
connect ( wvDetails, &QgsWebView::linkClicked, this , &QgsPluginManager::wvDetails_linkClicked );
74
73
connect ( leFilter, &QgsFilterLineEdit::textChanged, this , &QgsPluginManager::leFilter_textChanged );
@@ -128,7 +127,13 @@ QgsPluginManager::QgsPluginManager( QWidget *parent, bool pluginsAreEnabled, Qt:
128
127
mPluginsDetailsSplitter ->restoreState ( settings.value ( QStringLiteral ( " Windows/PluginManager/secondSplitterState" ) ).toByteArray () );
129
128
// 2) The current mOptionsListWidget index (it will overwrite the "tab" setting of QgsOptionsDialogBase that handles the stackedWidget page
130
129
// instead of the mOptionsListWidget index). Then the signal connected above will update the relevant page as well.
131
- mOptionsListWidget ->setCurrentRow ( settings.value ( QStringLiteral ( " Windows/PluginManager/option" ), 0 ).toInt () );
130
+ int option = settings.value ( QStringLiteral ( " Windows/PluginManager/option" ), 0 ).toInt ();
131
+ mOptionsListWidget ->setCurrentRow ( option );
132
+ if ( option == 0 )
133
+ {
134
+ // The first option won't fire the currentRowChanged signal, so initialize the first tab explicitly
135
+ setCurrentTab ( 0 );
136
+ }
132
137
133
138
// Hide widgets only suitable with Python support enabled (they will be uncovered back in setPythonUtils)
134
139
buttonUpgradeAll->hide ();
@@ -1235,31 +1240,13 @@ void QgsPluginManager::setCurrentTab( int idx )
1235
1240
1236
1241
1237
1242
void QgsPluginManager::currentPluginChanged ( const QModelIndex &index )
1238
- {
1239
- if ( index .column () == 0 )
1240
- {
1241
- // Do exactly the same as if a plugin was clicked
1242
- vwPlugins_clicked ( index );
1243
- }
1244
- }
1245
-
1246
-
1247
-
1248
- void QgsPluginManager::vwPlugins_clicked ( const QModelIndex &index )
1249
1243
{
1250
1244
if ( index .column () == 0 )
1251
1245
{
1252
1246
// If the model has been filtered, the index row in the proxy won't match the index row in the underlying model
1253
1247
// so we need to jump through this little hoop to get the correct item
1254
1248
QModelIndex realIndex = mModelProxy ->mapToSource ( index );
1255
1249
QStandardItem *mypItem = mModelPlugins ->itemFromIndex ( realIndex );
1256
- if ( !mypItem->isEnabled () )
1257
- {
1258
- // The item is inactive (uncompatible or broken plugin), so it can't be selected. Display it's data anyway.
1259
- vwPlugins->clearSelection ();
1260
- }
1261
- // Display details in any case: selection changed, inactive button clicked,
1262
- // or previously selected plugin clicked (while details view contains the welcome message for a category)
1263
1250
showPluginDetails ( mypItem );
1264
1251
}
1265
1252
}
0 commit comments