mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
CModListView::loadScreenshots(): Check isValid() instead of row() and column()
Co-authored-by: Andrey Filipenkov <kambaladecapitator@gmail.com>
This commit is contained in:
parent
4f06aed631
commit
70e309c4f9
@ -962,7 +962,7 @@ void CModListView::loadScreenshots()
|
||||
{
|
||||
if(ui->tabWidget->currentIndex() == 2)
|
||||
{
|
||||
if(ui->allModsView->currentIndex().row() == -1 || ui->allModsView->currentIndex().column() == -1)
|
||||
if(!ui->allModsView->currentIndex().isValid())
|
||||
{
|
||||
// select the first mod, so we can access its data
|
||||
ui->allModsView->setCurrentIndex(filterModel->index(0, 0));
|
||||
|
Loading…
Reference in New Issue
Block a user