From 386dcf8180332ebb0d7829fb6c487661b0e89e3c Mon Sep 17 00:00:00 2001 From: Julius Juodakis Date: Thu, 7 Jan 2021 11:54:33 +1300 Subject: [PATCH] setSpan broke LinearRegionItem (#1488) (#1491) --- pyqtgraph/graphicsItems/LinearRegionItem.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyqtgraph/graphicsItems/LinearRegionItem.py b/pyqtgraph/graphicsItems/LinearRegionItem.py index 56ff5748..e0fe53c0 100644 --- a/pyqtgraph/graphicsItems/LinearRegionItem.py +++ b/pyqtgraph/graphicsItems/LinearRegionItem.py @@ -191,8 +191,8 @@ class LinearRegionItem(GraphicsObject): self.update() def boundingRect(self): - br = self.viewRect() # bounds of containing ViewBox mapped to local coords. - + br = QtCore.QRectF(self.viewRect()) # bounds of containing ViewBox mapped to local coords. + rng = self.getRegion() if self.orientation in ('vertical', LinearRegionItem.Vertical): br.setLeft(rng[0])