setSpan broke LinearRegionItem (#1488) (#1491)

This commit is contained in:
Julius Juodakis 2021-01-07 11:54:33 +13:00 committed by GitHub
parent 85719fd8df
commit 386dcf8180
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,8 +191,8 @@ class LinearRegionItem(GraphicsObject):
self.update() self.update()
def boundingRect(self): 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() rng = self.getRegion()
if self.orientation in ('vertical', LinearRegionItem.Vertical): if self.orientation in ('vertical', LinearRegionItem.Vertical):
br.setLeft(rng[0]) br.setLeft(rng[0])