Merge pull request #1567 from ksunden/inf_line_0d
Handle case of 0-d array in infinite line setPos
This commit is contained in:
commit
87b03b5a2a
|
@ -225,7 +225,7 @@ class InfiniteLine(GraphicsObject):
|
||||||
|
|
||||||
def setPos(self, pos):
|
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)
|
newPos = list(pos)
|
||||||
elif isinstance(pos, QtCore.QPointF):
|
elif isinstance(pos, QtCore.QPointF):
|
||||||
newPos = [pos.x(), pos.y()]
|
newPos = [pos.x(), pos.y()]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user