瀏覽代碼

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 10 月之前
父節點
當前提交
a245000749
共有 1 個文件被更改,包括 1 次插入1 次删除
  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()
 {
-	selectMod(filterModel->rowCount() > 0 ? filterModel->index(0, 0) : QModelIndex());
+	ui->allModsView->setCurrentIndex(filterModel->rowCount() > 0 ? filterModel->index(0, 0) : QModelIndex());
 }
 
 void CModListView::checkManagerErrors()