mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-02 06:59:13 +01:00
feat(editor): the kilometrage tool leads a line through a station along the tracks chosen, the straight paths of the switches by default, from the track chosen on along them until the line meets its tracks again or on and away at a junction, kept as //$k via lines; a track beside that comes back onto the line between the stretches it runs beside it or both ways is a track of a station, not the other track of a double-track line
This commit is contained in:
@@ -2188,7 +2188,7 @@ bool editor_track::find_route(TTrack *From, TTrack *To, route &Route, std::strin
|
||||
return true;
|
||||
}
|
||||
|
||||
editor_track::route editor_track::run_route(TTrack &Track, double const Maximum)
|
||||
editor_track::route editor_track::run_route(TTrack &Track, double const Maximum, int const Path)
|
||||
{
|
||||
route result;
|
||||
if (false == is_supported(Track))
|
||||
@@ -2228,7 +2228,7 @@ editor_track::route editor_track::run_route(TTrack &Track, double const Maximum)
|
||||
}
|
||||
return nodes;
|
||||
};
|
||||
auto const own{main_of(Track)};
|
||||
auto const own{Path >= 0 && Path < static_cast<int>(Track.m_paths.size()) ? Path : main_of(Track)};
|
||||
auto const ahead{walk({&Track, own, true})};
|
||||
auto const behind{walk({&Track, own, false})};
|
||||
for (auto node = behind.rbegin(); node != behind.rend(); ++node)
|
||||
|
||||
Reference in New Issue
Block a user