1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-21 21:17:49 +02:00

Undefined behavior fix

This commit is contained in:
nordsoft 2023-09-16 05:59:16 +02:00
parent 033e7010ca
commit 10d783d8ee

View File

@ -511,6 +511,7 @@ void RewardsWidget::on_removeVisitInfo_clicked()
delete ui->visitInfoList->currentItem();
ui->visitInfoList->blockSignals(false);
on_visitInfoList_itemSelectionChanged();
loadCurrentVisitInfo(ui->visitInfoList->currentRow());
}
void RewardsWidget::on_selectMode_currentIndexChanged(int index)
@ -534,13 +535,15 @@ void RewardsWidget::on_visitInfoList_itemSelectionChanged()
}
ui->eventInfoGroup->show();
loadCurrentVisitInfo(ui->visitInfoList->currentRow());
}
void RewardsWidget::on_visitInfoList_currentItemChanged(QListWidgetItem * current, QListWidgetItem * previous)
{
if(previous)
saveCurrentVisitInfo(ui->visitInfoList->row(previous));
if(current)
loadCurrentVisitInfo(ui->visitInfoList->currentRow());
}