17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-02 23:16:22 +01:00

feat(editor): the drive of a switch stands by the tips of its blades, not at the joint before them, and goes with the switch deleted. A drive placed, changed or carried along with its switch is set where the blades begin, as they're shaped or where the diverging track is broken at the tip of a planed blade, along the main track there, its heading and its tilt taken there; the drives the earlier versions of the editor set at the joints are moved there once, as the scenery is opened and the templates are known, with no step of the undo history, to be saved with it. Deleting a switch, a double switch or a set of tracks takes the drives of the switches along in the same step, Ctrl+Z brings them back. The joint before the blades and the tips of the blades of the switch being placed or the one selected are marked across the track in the view, so the tips seen on the photo aren't taken for the start of the switch. Selftests bladetips, drivetips; on a copy of test42 the drive of z1 went from the joint to 1.248 m, deleted with z1, back with Ctrl+Z

This commit is contained in:
maj00r
2026-10-26 20:40:37 +01:00
parent 3b43c71dbb
commit ef592e6479
9 changed files with 174 additions and 4 deletions

View File

@@ -1831,6 +1831,7 @@ void editor_mode::track_set_delete()
}
auto const designs{designs_trimmed(removed)};
push_track_snapshot({}, {}, removed);
drives_deleted(removed);
m_track_set.clear();
m_node = nullptr;
ui()->set_node(nullptr);