Commit d69a087e authored by SLLH's avatar SLLH
Browse files

Modify the bug

parent 42230e04
...@@ -704,8 +704,9 @@ class Canvas(QWidget): ...@@ -704,8 +704,9 @@ class Canvas(QWidget):
def keyPressEvent(self, ev): def keyPressEvent(self, ev):
key = ev.key() key = ev.key()
shapesBackup = []
shapesBackup = copy.deepcopy(self.shapes) shapesBackup = copy.deepcopy(self.shapes)
if len(shapesBackup) == 0:
return
self.shapesBackups.pop() self.shapesBackups.pop()
self.shapesBackups.append(shapesBackup) self.shapesBackups.append(shapesBackup)
if key == Qt.Key_Escape and self.current: if key == Qt.Key_Escape and self.current:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment