1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-20 03:29:32 +02:00

Merge pull request #3968 from godric3/map-editor-fix-seer-crash

Map editor fix seer crash
This commit is contained in:
Ivan Savenko 2024-05-14 12:16:08 +03:00 committed by GitHub
commit 278fd89360
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -34,7 +34,7 @@ RewardsWidget::RewardsWidget(CMap & m, CRewardableObject & p, QWidget *parent) :
//fill core elements
for(const auto & s : Rewardable::VisitModeString)
ui->selectMode->addItem(QString::fromUtf8(s.data(), s.size()));
ui->visitMode->addItem(QString::fromUtf8(s.data(), s.size()));
for(const auto & s : Rewardable::SelectModeString)
ui->selectMode->addItem(QString::fromUtf8(s.data(), s.size()));
@ -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>