Just drop "line dot" updates for now..

incremental_update_paths
Tyler Goodlet 2022-05-17 19:18:31 -04:00
parent 81be0b4bd0
commit e258654c86
1 changed files with 14 additions and 14 deletions

View File

@ -108,20 +108,20 @@ class LineDot(pg.CurvePoint):
# TODO: get rid of this ``.getData()`` and # TODO: get rid of this ``.getData()`` and
# make a more pythonic api to retreive backing # make a more pythonic api to retreive backing
# numpy arrays... # numpy arrays...
(x, y) = self.curve().getData() # (x, y) = self.curve().getData()
index = self.property('index') # index = self.property('index')
# first = self._plot._arrays['ohlc'][0]['index'] # # first = self._plot._arrays['ohlc'][0]['index']
# first = x[0] # # first = x[0]
# i = index - first # # i = index - first
if index: # if index:
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( # QtWidgets.QGraphicsItem.setPos(
self, # self,
*newPos, # *newPos,
) # )
return True # return True
return False return False