18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-19 04:05:58 +01:00

Merge pull request #285 from MaSzyna-EU07/feat/duplicate-cab-control-submodels

Cab controls with more than one submodel (eu07/maszyna#527)
This commit is contained in:
2026-11-09 12:50:54 +00:00
committed by GitHub
5 changed files with 164 additions and 7 deletions

View File

@@ -60,6 +60,11 @@ void control_mapper::insert(TGauge const &Gauge, std::string const &Label)
{
m_controlnames.try_emplace(Gauge.SubModelOn, Label);
}
// the duplicate submodels of a control (duplicate: yes) work the control as well (eu07/maszyna#527)
for (auto const &mirror : Gauge.mirrors())
{
insert(mirror, Label);
}
m_names.emplace(Label);
}
@@ -11451,6 +11456,7 @@ void TTrain::clear_cab_controls()
ggLeftEndLightButton.Clear();
ggRightEndLightButton.Clear();
ggLightsButton.Clear();
ggCompressorListButton.Clear();
// hunter-230112
ggRearLeftLightButton.Clear();
ggRearRightLightButton.Clear();