From 27ca1747f1feff3a00fbbafb8d5165cba9b84c17 Mon Sep 17 00:00:00 2001 From: Ogi Moore Date: Thu, 22 Oct 2020 11:17:33 -0700 Subject: [PATCH] Call GraphicsItem.viewTransformChanged() (#1413) * Call GraphicsItem.viewTransformChanged() * Needed to apply to labels too --- pyqtgraph/graphicsItems/InfiniteLine.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyqtgraph/graphicsItems/InfiniteLine.py b/pyqtgraph/graphicsItems/InfiniteLine.py index cec6b967..9cbf7229 100644 --- a/pyqtgraph/graphicsItems/InfiniteLine.py +++ b/pyqtgraph/graphicsItems/InfiniteLine.py @@ -2,6 +2,7 @@ from ..Qt import QtGui, QtCore from ..Point import Point from .GraphicsObject import GraphicsObject +from .GraphicsItem import GraphicsItem from .TextItem import TextItem from .ViewBox import ViewBox from .. import functions as fn @@ -431,6 +432,7 @@ class InfiniteLine(GraphicsObject): Called whenever the transformation matrix of the view has changed. (eg, the view range has changed or the view was resized) """ + GraphicsItem.viewTransformChanged(self) self._invalidateCache() def setName(self, name): @@ -607,6 +609,7 @@ class InfLineLabel(TextItem): ev.acceptDrags(QtCore.Qt.LeftButton) def viewTransformChanged(self): + GraphicsItem.viewTransformChanged(self) self.updatePosition() TextItem.viewTransformChanged(self)