Little formattito
parent
1f95ba4fd8
commit
f67fd11a29
|
@ -98,9 +98,11 @@ class LineDot(pg.CurvePoint):
|
||||||
ev: QtCore.QEvent,
|
ev: QtCore.QEvent,
|
||||||
|
|
||||||
) -> bool:
|
) -> bool:
|
||||||
if not isinstance(
|
|
||||||
ev, QtCore.QDynamicPropertyChangeEvent
|
if (
|
||||||
) or self.curve() is None:
|
not isinstance(ev, QtCore.QDynamicPropertyChangeEvent)
|
||||||
|
or self.curve() is None
|
||||||
|
):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# TODO: get rid of this ``.getData()`` and
|
# TODO: get rid of this ``.getData()`` and
|
||||||
|
@ -115,7 +117,10 @@ class LineDot(pg.CurvePoint):
|
||||||
i = round(index - x[0])
|
i = round(index - x[0])
|
||||||
if i > 0 and i < len(y):
|
if i > 0 and i < len(y):
|
||||||
newPos = (index, y[i])
|
newPos = (index, y[i])
|
||||||
QtWidgets.QGraphicsItem.setPos(self, *newPos)
|
QtWidgets.QGraphicsItem.setPos(
|
||||||
|
self,
|
||||||
|
*newPos,
|
||||||
|
)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue