Pārlūkot izejas kodu

Fix crash on attempting to install mod when nothing is selected

Fixes situation in which it was possible to have mod description and mod
actions visible (usually for 1st mod in list) without actually having
this mod selected in the list, leading to crash on pressing "Install"
button.

Now selection should be updated correctly in both mod description view
and in mod list
Ivan Savenko 11 mēneši atpakaļ
vecāks
revīzija
a245000749
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      launcher/modManager/cmodlistview_moc.cpp

+ 1 - 1
launcher/modManager/cmodlistview_moc.cpp

@@ -932,7 +932,7 @@ void CModListView::on_pushButton_clicked()
 
 
 void CModListView::modelReset()
 void CModListView::modelReset()
 {
 {
-	selectMod(filterModel->rowCount() > 0 ? filterModel->index(0, 0) : QModelIndex());
+	ui->allModsView->setCurrentIndex(filterModel->rowCount() > 0 ? filterModel->index(0, 0) : QModelIndex());
 }
 }
 
 
 void CModListView::checkManagerErrors()
 void CModListView::checkManagerErrors()