4 ms·
just wait until you get to the undo/redo stack! That's one of my favourite parts of a UI to program.
by escapecharacter 2y ago
just wait until you get to the undo/redo stack! That's one of my favourite parts of a UI to program.
- mark-r 2y agoMy experience is that undo/redo isn't something you tack on at the end of the project, it has to be baked into the infrastructure. Every action you take has to be delegated to an object that has all the information it needs to both do the action and undo it. Then you can just keep a stack of those objects and call them as necessary.
- airstrike 2y agoFortunately I'm using iced which is an implementation of The Elm Architecture so undo/redo is just a matter of keeping track of which messages were sent and reversing them as needed.