Skip to content

Commit

Permalink
has to be handled when redoing as well, but not as a discrete step
Browse files Browse the repository at this point in the history
  • Loading branch information
iamllama committed Jan 22, 2025
1 parent d6c68e5 commit 523c635
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ts/routes/image-occlusion/tools/tool-undo-redo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ class UndoStack {
}

redo(): void {
if (this.canvas) {
// when redoing, removing an unfinished polygon doesn't make sense as a discrete step
removeUnfinishedPolygon(this.canvas);
}
if (this.canRedo()) {
this.index++;
this.updateState();
Expand Down

0 comments on commit 523c635

Please sign in to comment.