mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-02 23:16:22 +01:00
feat(editor): the lines out of a station take the automatic block of 3 or 4 aspects, the block sections no shorter than the braking distance or than half of it, the block signals placed with the templates of the aspects and those standing swapped for them; block boundaries drawn by hand, a click on a track of a line of the automatic block placing block signals across both tracks there, numbered after the hectometre, the tracks cut beyond them and the block sections named and switched anew, a click on one standing taking its signals and the switching of their sections away, a step of undo each, the lengths of the sections either side shown at the mouse. A line whose block signals stand keeps them as they stand, Set the line signals placing them evenly only on a line without any, and one whose block signals no block section of the editor switches keeps the block of the scenery untouched; the signals of the other block left along a line taken away, but where it shares its track with a line of that block, and the switching of the sections gone from the lines set with them. A block signal of 4 aspects is checked for a section no shorter than half the braking distance, and fitted with templates of its aspects only
This commit is contained in:
@@ -458,6 +458,16 @@ editor_mode::track_intent editor_mode::track_intent_at(int const Mods)
|
||||
}
|
||||
return intent;
|
||||
}
|
||||
if (m_track_tab == track_tab::srk && m_srk.drawing())
|
||||
{
|
||||
bool valid{false};
|
||||
intent.track = m_hover.track;
|
||||
intent.path = m_hover.path;
|
||||
intent.position = m_hover.track != nullptr ? m_hover.point : ground;
|
||||
intent.action = m_srk.boundary_hover(intent.position, valid);
|
||||
intent.what = kind::srk_boundary;
|
||||
return intent;
|
||||
}
|
||||
if (m_track_tab == track_tab::srk && m_hover.track != nullptr)
|
||||
{
|
||||
intent.track = m_hover.track;
|
||||
@@ -810,6 +820,7 @@ void editor_mode::track_press(track_intent const &Intent)
|
||||
if (Intent.track != nullptr)
|
||||
m_km.pick(*Intent.track, Intent.position);
|
||||
return;
|
||||
case kind::srk_boundary: m_srk.boundary_click(); return;
|
||||
case kind::fouling:
|
||||
if (Intent.path == 1)
|
||||
m_fouling.fix(Intent.index);
|
||||
|
||||
Reference in New Issue
Block a user