Fix batch undoing for drags

This commit is contained in:
Isaiah Odhner 2023-09-10 01:45:53 -04:00
parent 0e9f6d28a7
commit baa2b8cbc6

View File

@ -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()