1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

checking also for height for selecting buttons

This commit is contained in:
Laserlicht
2025-11-14 20:32:06 +01:00
parent 293a1a7045
commit 5464140a41

View File

@@ -384,7 +384,7 @@ void RandomMapTab::setMapGenOptions(std::shared_ptr<CMapGenOptions> opts)
}
}
auto position = vstd::find_pos(getPossibleMapSizes(), opts->getWidth());
w->setSelected(position == mapSizes.size() - 1 ? -1 : position);
w->setSelected(position == mapSizes.size() - 1 || opts->getWidth() != opts->getHeight() ? -1 : position);
}
if(auto w = widget<CToggleButton>("buttonTwoLevels"))
{