1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-18 17:40:48 +02:00

Fixes in new map settings save / load

This commit is contained in:
Tomasz Zielinski 2022-09-08 22:34:23 +02:00
parent 773877f523
commit 3656b2ef67

View File

@ -84,16 +84,16 @@ void WindowNewMap::loadUserSettings()
{ {
case EWaterContent::RANDOM: case EWaterContent::RANDOM:
ui->waterOpt1->setChecked(true); break; ui->waterOpt1->setChecked(true); break;
case EWaterContent::NORMAL:
ui->waterOpt2->setChecked(true); break;
case EWaterContent::ISLANDS:
ui->waterOpt3->setChecked(true); break;
case EWaterContent::NONE: case EWaterContent::NONE:
ui->waterOpt2->setChecked(true); break;
case EWaterContent::NORMAL:
ui->waterOpt3->setChecked(true); break;
case EWaterContent::ISLANDS:
ui->waterOpt4->setChecked(true); break; ui->waterOpt4->setChecked(true); break;
} }
} }
auto monsterStrength = s.value(newMapWaterContent); auto monsterStrength = s.value(newMapMonsterStrength);
if (monsterStrength.isValid()) if (monsterStrength.isValid())
{ {
switch (monsterStrength.toInt()) switch (monsterStrength.toInt())
@ -160,7 +160,7 @@ void WindowNewMap::saveUserSettings()
monster = EMonsterStrength::GLOBAL_NORMAL; monster = EMonsterStrength::GLOBAL_NORMAL;
else if(ui->monsterOpt4->isChecked()) else if(ui->monsterOpt4->isChecked())
monster = EMonsterStrength::GLOBAL_STRONG; monster = EMonsterStrength::GLOBAL_STRONG;
s.setValue(newMapMonsterStrength, static_cast<int>(water)); s.setValue(newMapMonsterStrength, static_cast<int>(monster));
auto templateName = ui->templateCombo->currentText(); auto templateName = ui->templateCombo->currentText();
if (templateName.size()) if (templateName.size())