1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-21 19:19:26 +02:00

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
This commit is contained in:
Ivan Savenko 2024-12-24 15:45:17 +00:00
parent ec25eb557b
commit a245000749

View File

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