17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-06 18:38:36 +01:00

feat(editor): a slip keeps in the scenery the radius of the main track it's bent with, as a switch does, the lists of the switches telling it as Rg: switch_store::main_radius_of gives it from the first path of a switch, classify takes it from there too; a slip laid on straights keeps 0

This commit is contained in:
maj00r
2026-10-27 19:23:31 +01:00
parent 89b6ca07af
commit 1340017be3
3 changed files with 14 additions and 6 deletions

View File

@@ -369,6 +369,8 @@ void editor_mode::record_slip(std::vector<TTrack *> const &Parts, std::string co
if (first == nullptr || first->m_paths.empty())
return;
switch_store::place(entry, *first);
// a slip bent into a curve, as a switch is
entry.main_radius = switch_store::main_radius_of(*first);
switch_store::put(entry, alignment_store::layer_of(*first));
}