mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-21 22:01:31 +03:00
Fix batch undoing for drags
This commit is contained in:
parent
0e9f6d28a7
commit
baa2b8cbc6
@ -108,10 +108,10 @@ class PilotRecorder():
|
||||
self.steps_changed()
|
||||
elif isinstance(event, Key):
|
||||
if event.key == "ctrl+z" and self.steps:
|
||||
if isinstance(self.steps[-1], MouseUp):
|
||||
while isinstance(self.steps[-1][0], (MouseMove, MouseUp)):
|
||||
self.steps.pop()
|
||||
self.steps.pop()
|
||||
while isinstance(self.steps[-1], MouseMove):
|
||||
while isinstance(self.steps[-1][0], MouseMove):
|
||||
self.steps.pop()
|
||||
|
||||
self.steps_changed()
|
||||
|
Loading…
Reference in New Issue
Block a user