Fix brush preview artifacts when undoing/redoing

This commit is contained in:
Isaiah Odhner 2023-04-14 02:21:12 -04:00
parent 98d04f55f6
commit 20e2f1a52d

View File

@ -675,6 +675,7 @@ class PaintApp(App):
def action_undo(self) -> None:
if len(self.undos) > 0:
self.cancel_preview()
action = self.undos.pop()
redo_action = Action("Undo " + action.name, self.image, action.region)
action.undo(self.image)
@ -683,6 +684,7 @@ class PaintApp(App):
def action_redo(self) -> None:
if len(self.redos) > 0:
self.cancel_preview()
action = self.redos.pop()
undo_action = Action("Undo " + action.name, self.image, action.region)
action.undo(self.image)