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

fix(editor): Esc takes back what a drag did

Esc in the middle of dragging a point of a track kept the moved point,
and the hint said so; dragging a straight was taken back but left an
empty step in the history; a vertex or the radius grip of a curve stayed
moved in the design. Now Esc puts back what was there before the drag in
all three, and the history doesn't keep a step for it.
This commit is contained in:
maj00r
2026-10-21 11:09:06 +02:00
parent 7da0432dca
commit ddde8d12d9
6 changed files with 33 additions and 2 deletions

View File

@@ -351,6 +351,7 @@ void editor_mode::point_drag_update()
for (auto *dragged : m_track_drag)
states.emplace_back(dragged, editor_track::capture(*dragged));
push_track_snapshot(std::move(states));
drag.step = m_history.size();
records_watch_begin();
}
screen_projection const projection;