Modify the bug

pull/4860/head
LuGu 2021-12-07 21:52:58 +08:00
parent 42230e04e9
commit d69a087eb7
1 changed files with 2 additions and 1 deletions

View File

@ -704,8 +704,9 @@ class Canvas(QWidget):
def keyPressEvent(self, ev):
key = ev.key()
shapesBackup = []
shapesBackup = copy.deepcopy(self.shapes)
if len(shapesBackup) == 0:
return
self.shapesBackups.pop()
self.shapesBackups.append(shapesBackup)
if key == Qt.Key_Escape and self.current: