소스 검색

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()