catch specific KeyError exception

This commit is contained in:
KIU Shueng Chuan 2021-07-18 10:45:58 +08:00
parent 6f49ede5c1
commit cbc9b4d310

View File

@ -486,7 +486,7 @@ class GLViewWidget(QtWidgets.QOpenGLWidget):
return
try:
del self.keysPressed[ev.key()]
except:
except KeyError:
self.keysPressed = {}
self.evalKeyState()