17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 12:09:19 +02:00

feat(editor): a switch on a straight slides along it: drag it with the mouse in the Switch or Path mode (snapping to the joints, km shown) or type the distance in its window; the straight paths on both sides get shorter or longer, the ones it runs over are cut, the next switch or the end of the straight stops it; Replace the geometry with the template does the same with the ends of a longer or shorter type instead of leaving the neighbour overlapping it; a straight neighbour following an end that neither moved off its line nor turned keeps its zero control vectors; self-test commands switchslide, switchreplace, pathsnear; Polish translation

This commit is contained in:
maj00r
2026-10-11 18:21:53 +02:00
parent 3b503ede0c
commit 12f7fc879f
7 changed files with 491 additions and 30 deletions

View File

@@ -1418,6 +1418,8 @@ bool editor_mode::update()
finish_track_box();
update_track_hover();
point_drag_update();
switch_slide_update();
draw_switch_slide();
if (m_track_tab == track_tab::turntable)
draw_turntable_overlay();
if (m_track_tab == track_tab::signals)
@@ -5700,6 +5702,8 @@ void editor_mode::on_mouse_button(int const Button, int const Action, int const
turntable_finish_placement();
if (m_signal.placing || m_signal.moving)
signal_release();
if (m_switch.slide.active)
switch_slide_finish();
}
m_dragging = false;