1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-17 11:56:46 +02:00

Workaround for vcmi-extras bug

This commit is contained in:
Ivan Savenko 2023-12-21 16:09:01 +02:00
parent fe5918ebf5
commit 37a8c8db8d

View File

@ -358,7 +358,11 @@ void RandomMapTab::setMapGenOptions(std::shared_ptr<CMapGenOptions> opts)
}
for(auto r : VLC->roadTypeHandler->objects)
{
if(auto w = widget<CToggleButton>(r->getJsonKey()))
// Workaround for vcmi-extras bug
std::string jsonKey = r->getJsonKey();
std::string identifier = jsonKey.substr(jsonKey.find(':')+1);
if(auto w = widget<CToggleButton>(identifier))
{
w->setSelected(opts->isRoadEnabled(r->getId()));
}