mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Fix rewards bug
This commit is contained in:
parent
dd463ca95a
commit
cd28a0791b
@ -346,8 +346,12 @@ void RewardsWidget::on_buttonAdd_clicked()
|
||||
|
||||
void RewardsWidget::on_buttonRemove_clicked()
|
||||
{
|
||||
ui->rewardsTable->removeRow(ui->rewardsTable->currentRow());
|
||||
--rewards;
|
||||
auto currentRow = ui->rewardsTable->currentRow();
|
||||
if(currentRow != -1)
|
||||
{
|
||||
ui->rewardsTable->removeRow(currentRow);
|
||||
--rewards;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user