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:
parent
fe5918ebf5
commit
37a8c8db8d
@ -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()));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user