1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

map editor: block remove visit info button if no info to remove

This commit is contained in:
godric3 2024-05-13 22:40:26 +02:00
parent 578800b3e3
commit e7c03e3387
2 changed files with 5 additions and 0 deletions

View File

@ -636,10 +636,12 @@ void RewardsWidget::on_visitInfoList_itemSelectionChanged()
if(ui->visitInfoList->currentItem() == nullptr)
{
ui->eventInfoGroup->hide();
ui->removeVisitInfo->setEnabled(false);
return;
}
ui->eventInfoGroup->show();
ui->removeVisitInfo->setEnabled(true);
}
void RewardsWidget::on_visitInfoList_currentItemChanged(QListWidgetItem * current, QListWidgetItem * previous)

View File

@ -36,6 +36,9 @@
</item>
<item>
<widget class="QPushButton" name="removeVisitInfo">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Remove</string>
</property>