Liveries panel: undo and redo (SIX-249) #452

Manually merged
github merged 10 commits from github-bot/gh-452 into gh-pr/452/base 2026-11-27 05:55:03 +00:00 AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-27 04:14 UTC · original
holdmysocks:claude/livery-undo → master · +2659 −92 · 26 files · 10 commits · merged 2026-11-27 05:54 UTC

What

Undo and redo in the Liveries panel (SIX-249). A wrong drag, a mistaken delete or "Clear" could not be taken back.

  • Undo and Redo buttons in the panel's top row, and Ctrl+Z, Ctrl+Y or Ctrl+Shift+Z while the panel is open and no text is being typed (a text field keeps its own undo).
  • A step is what changed between two moments of rest: a drag, a turn of the wheel or a run of typing is one step. It is taken when no pointer button is down and nothing has changed for 0.35 s. Undo right after a change takes that change back without waiting.
  • Everything that changes the stickers is covered, because the history watches the livery itself: add, delete, duplicate, reorder, zones, placement, colours, show / hide, Clear, opening a livery file, putting on a game livery.
  • The numbers the viewer writes back for reference (shader_uv) are not a change.
  • 200 steps are kept. Another vehicle starts a new history; the stickers a vehicle opens with are the start, so undo never goes back past the loaded file. Saving does not clear the history.
  • Scripted: --livery-undo N and --livery-redo N run after the other scripted steps and before a scripted save.

Checked

  • Unit test of the history (undo_goes_back_a_step_and_redo_forward): an add and a drag over several frames are two steps; a held pointer takes no step; shader_uv alone is no change; undo and redo go back and forward through both; undo right after a change; a new change drops what could be redone; another vehicle starts anew. cargo test -p sixng-gui: 54 pass.
  • Scripted on the box truck with its three saved stickers: add a sticker and click a wall panel, then --livery-undo 1: three stickers are left and the panel says "undone". With --livery-undo 1 --livery-redo 1: four stickers again, "redone", and the livery counts as not saved.
  • cargo build --release -p sixng-gui without warnings.

Not decoded / not done

  • Not tried by hand with a mouse or keyboard: the buttons, the shortcuts and how a real drag or slider is cut into steps were not exercised by a person. The scripted steps go through the same history.
  • "Load" (reading the saved file again) starts a new history; it cannot be undone.
  • The selection is not part of a step: after an undo the same row stays selected if it still exists.
  • A picture that is read late (a large file) can add a step of its own when a new sticker is fitted to it.
  • Screenshots are not attached (they show game assets); they were handed to the user directly.
**@⁠holdmysocks** on GitHub · 2026-11-27 04:14 UTC · [original](https://github.com/holdmysocks/SixNG/pull/452) `holdmysocks:claude/livery-undo` → `master` · +2659 −92 · 26 files · 10 commits · merged 2026-11-27 05:54 UTC ## What Undo and redo in the Liveries panel (SIX-249). A wrong drag, a mistaken delete or "Clear" could not be taken back. - **Undo** and **Redo** buttons in the panel's top row, and Ctrl+Z, Ctrl+Y or Ctrl+Shift+Z while the panel is open and no text is being typed (a text field keeps its own undo). - A step is what changed between two moments of rest: a drag, a turn of the wheel or a run of typing is one step. It is taken when no pointer button is down and nothing has changed for 0.35 s. Undo right after a change takes that change back without waiting. - Everything that changes the stickers is covered, because the history watches the livery itself: add, delete, duplicate, reorder, zones, placement, colours, show / hide, Clear, opening a livery file, putting on a game livery. - The numbers the viewer writes back for reference (`shader_uv`) are not a change. - 200 steps are kept. Another vehicle starts a new history; the stickers a vehicle opens with are the start, so undo never goes back past the loaded file. Saving does not clear the history. - Scripted: `--livery-undo N` and `--livery-redo N` run after the other scripted steps and before a scripted save. ## Checked - Unit test of the history (`undo_goes_back_a_step_and_redo_forward`): an add and a drag over several frames are two steps; a held pointer takes no step; `shader_uv` alone is no change; undo and redo go back and forward through both; undo right after a change; a new change drops what could be redone; another vehicle starts anew. `cargo test -p sixng-gui`: 54 pass. - Scripted on the box truck with its three saved stickers: add a sticker and click a wall panel, then `--livery-undo 1`: three stickers are left and the panel says "undone". With `--livery-undo 1 --livery-redo 1`: four stickers again, "redone", and the livery counts as not saved. - `cargo build --release -p sixng-gui` without warnings. ## Not decoded / not done - Not tried by hand with a mouse or keyboard: the buttons, the shortcuts and how a real drag or slider is cut into steps were not exercised by a person. The scripted steps go through the same history. - "Load" (reading the saved file again) starts a new history; it cannot be undone. - The selection is not part of a step: after an undo the same row stays selected if it still exists. - A picture that is read late (a large file) can add a step of its own when a new sticker is fitted to it. - Screenshots are not attached (they show game assets); they were handed to the user directly.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 04:15:28 +00:00
github-bot changed target branch from master to gh-pr/452/base 2026-11-27 05:55:02 +00:00
github manually merged commit fed350a454 into gh-pr/452/base 2026-11-27 05:55:03 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.