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])