Drop coordinate cacheing from `BarItems`, causes weird jitter on pan

pre_viz_calls
Tyler Goodlet 2022-12-18 19:50:07 -05:00
parent 0d31f5293a
commit 44e7170078
1 changed files with 4 additions and 2 deletions

View File

@ -118,9 +118,11 @@ class BarItems(pg.GraphicsObject):
self.last_bar_pen = pg.mkPen(hcolor(last_bar_color), width=2) self.last_bar_pen = pg.mkPen(hcolor(last_bar_color), width=2)
self._name = name self._name = name
self.setCacheMode(QtWidgets.QGraphicsItem.DeviceCoordinateCache) # XXX: causes this weird jitter bug when click-drag panning
self.path = QPainterPath() # where the path curve will awkwardly flicker back and forth?
# self.setCacheMode(QtWidgets.QGraphicsItem.DeviceCoordinateCache)
self.path = QPainterPath()
self._last_bar_lines: tuple[QLineF, ...] | None = None self._last_bar_lines: tuple[QLineF, ...] | None = None
def x_uppx(self) -> int: def x_uppx(self) -> int: