UNDO, REDO & NEW EDITS
After Undo, Can Redo Recover a Stroke If I Paint Again?
The current Minecraft skin creator code clears the Redo branch when you begin a new Pencil or Eraser stroke after Undo. To recover the undone stroke, use Redo before drawing again. We verified this in the public script and an offline history-logic check; a fresh browser click test is still pending.
If you have not drawn again
Use Redo while it is available to restore the undone state. Preserve a download before making a different edit if that version matters to you. In the offline check, Undo moved the previous drawing into the future stack; direct Redo restored that state.
If you already started a new stroke
The old Redo branch is cleared by the code that saves the new edit. Undoing this new edit moves the new edit into Redo; it does not recreate the discarded earlier branch. If you kept an exported PNG, preserve that file as your recovery source. We have not tested reimporting a backup in this guide.
A stroke can start history handling before it leaves a visible pixel. The current beginStroke function calls saveState for tools other than Pick color before attempting paintAt. Therefore, the code indicates that a Pencil or Eraser click in an invalid drawing area can still clear the Redo branch. This is a source-based inference, not a completed browser reproduction.
What did we actually verify?
| Action | Mock image state | Redo |
|---|---|---|
| Undo stroke A | Blank | Enabled |
| Direct Redo | Stroke A | Disabled |
| Undo, save new stroke B | Stroke B | Disabled |
| Restore from empty future | Stroke B stays | Disabled |
We fetched the public app.js and extracted saveState, restore, and updateHistoryButtons unchanged. An offline Node check used mock image objects and the same history and future arrays to exercise these branches. The results JSON includes the fetched script hash, method, scope, and observed mock states. It verifies stack handling, not rendering, PNG encoding, or pointer behavior in Chrome.
saveState records the current image and empties future. restore transfers the current image to the opposite stack and loads the saved image. The Redo button is disabled when future has no entries. These code paths explain why a new edit replaces the old recovery branch.
Does lowering Opacity count as drawing again?
The opacity input handler updates the readout; it does not call saveState. The earlier opacity guide separately tested changing the slider without painting. For this Redo question, we have not performed a new browser comparison of slider changes and pointer strokes. Keep those evidence scopes separate.
Is history a substitute for a saved file?
Do not treat an available Undo or Redo button as a durable backup. This guide does not establish whether history survives a refresh or a new session. Download the version you want to keep before risky edits. Our repeated-stroke test provides yesterday’s actual PNG comparison for Undo after a small edit.