return ValueError for wrong argument, not RuntimeError
This commit is contained in:
parent
fab505a431
commit
bc52a2afe0
@ -33,8 +33,8 @@ class GLViewWidget(QtWidgets.QOpenGLWidget):
|
|||||||
|
|
||||||
self.setFocusPolicy(QtCore.Qt.FocusPolicy.ClickFocus)
|
self.setFocusPolicy(QtCore.Qt.FocusPolicy.ClickFocus)
|
||||||
|
|
||||||
if rotationMethod not in {"euler", "quaternion"}:
|
if rotationMethod not in ["euler", "quaternion"]:
|
||||||
raise RuntimeError("Rotation method should be either 'euler' or 'quaternion'")
|
raise ValueError("Rotation method should be either 'euler' or 'quaternion'")
|
||||||
|
|
||||||
self.opts = {
|
self.opts = {
|
||||||
'center': Vector(0,0,0), ## will always appear at the center of the widget
|
'center': Vector(0,0,0), ## will always appear at the center of the widget
|
||||||
|
Loading…
Reference in New Issue
Block a user