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

fix(editor): the drive of a switch follows the switch: moved, turned, its grade or cant changed with the gizmo or any other change of the switch, the include gets the new position, direction and rot.x/rot.z of the start of the switch, in the same undo step; self-test drives prints the parameters of the drive

This commit is contained in:
maj00r
2026-10-11 19:23:59 +02:00
parent 4b785f3789
commit b103a561e0
4 changed files with 109 additions and 20 deletions

View File

@@ -1128,6 +1128,7 @@ void editor_mode::infra_buffer(infra::binding const &Binding, bool const Refresh
void editor_mode::track_captured(TTrack const &Track)
{
sweeps_captured(Track);
switch_drive_captured(Track);
if (m_infra_suspended || false == m_infra.follow)
return;
infra_load();
@@ -1166,6 +1167,7 @@ void editor_mode::track_captured(TTrack const &Track)
void editor_mode::tracks_committed(std::vector<TTrack *> const &Tracks)
{
sweeps_committed(Tracks);
switch_drives_committed(Tracks);
if (m_infra_suspended || false == m_infra.follow)
return;
infra_load();