Handle case of 0-d array in infinite line setPos

This commit is contained in:
Kyle Sunden 2021-02-10 13:59:37 -06:00
parent 389dff4250
commit 17b1b82ae9

View File

@ -225,7 +225,7 @@ class InfiniteLine(GraphicsObject):
def setPos(self, pos):
if type(pos) in [list, tuple, np.ndarray]:
if isinstance(pos, (list, tuple, np.ndarray)) and not np.ndim(pos) == 0:
newPos = list(pos)
elif isinstance(pos, QtCore.QPointF):
newPos = [pos.x(), pos.y()]