17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-02 03:29:12 +01:00

fix(editor): the tools see each change of the history by a revision of it, not by its size, which stood still once the oldest steps were dropped at the limit of 200 and came back to the same after an undo and another change: the SRK schematic, the lineside lists, the gauge, the joints, the speeds and the parallel track missed them

This commit is contained in:
maj00r
2026-10-22 16:06:25 +02:00
parent 43346b61e7
commit 2452c1cd0d
10 changed files with 33 additions and 25 deletions

View File

@@ -165,7 +165,8 @@ class editor_view
class editor_history
{
public:
virtual std::size_t history_size() const = 0;
// changes with each step of the history taken, undone or redone, also once the oldest steps are dropped
virtual std::size_t history_revision() const = 0;
virtual void push_track_snapshot(std::vector<std::pair<TTrack *, editor_track::state>> States, std::vector<TTrack *> Created = {}, std::vector<TTrack *> Removed = {}) = 0;
// the changes of the kilometrage made since the last step: one step of the history
virtual void push_kilometrage_snapshot() = 0;