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

feat(editor): undo and redo take back the kept alignments and switches together with the paths: each step of the history keeps the //$h and //$r records from before it; a deleted switch or slip forgets its record in the same step, so undoing the deletion brings it back; edits of the switch number, rail and km and forgetting a kept design stay outside the history; self-test commands deleting paths

This commit is contained in:
maj00r
2026-10-11 16:45:42 +02:00
parent b466755a0f
commit ddb637a3f5
8 changed files with 160 additions and 0 deletions

View File

@@ -2907,6 +2907,7 @@ bool editor_mode::save()
if (m_profile.changed)
profile_store();
switch_store::tidy();
switch_store::settle();
infra_store();
if (false == m_saved_camera.has_value() || glm::distance(m_saved_camera->first, glm::dvec3{Camera.Pos}) > 0.5 || glm::distance(m_saved_camera->second, glm::vec3{Camera.Angle}) > 0.01f)
{