mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-21 22:01:31 +03:00
Fix brush preview artifacts when undoing/redoing
This commit is contained in:
parent
98d04f55f6
commit
20e2f1a52d
2
paint.py
2
paint.py
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user