mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
@ -119,12 +119,11 @@ RandomMapTab::RandomMapTab():
|
||||
std::string cbRoadType = "selectRoad_" + road->getJsonKey();
|
||||
addCallback(cbRoadType, [&, road](bool on)
|
||||
{
|
||||
mapGenOptions->setRoadEnabled(road->getJsonKey(), on);
|
||||
mapGenOptions->setRoadEnabled(road->getId(), on);
|
||||
updateMapInfoByHost();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
build(config);
|
||||
|
||||
updateMapInfoByHost();
|
||||
@ -313,7 +312,7 @@ void RandomMapTab::setMapGenOptions(std::shared_ptr<CMapGenOptions> opts)
|
||||
{
|
||||
if(auto w = widget<CToggleButton>(r->getJsonKey()))
|
||||
{
|
||||
w->setSelected(opts->isRoadEnabled(r->getJsonKey()));
|
||||
w->setSelected(opts->isRoadEnabled(r->getId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user