Prevent viewbox auto-scaling to items that are not in the same scene.
This can happen when an item that was previously added to the viewbox is then removed using scene.removeItem().
This commit is contained in:
parent
9d0779cc32
commit
4beea8a153
@ -1280,7 +1280,7 @@ class ViewBox(GraphicsWidget):
|
||||
## First collect all boundary information
|
||||
itemBounds = []
|
||||
for item in items:
|
||||
if not item.isVisible():
|
||||
if not item.isVisible() or not item.scene() is self.scene():
|
||||
continue
|
||||
|
||||
useX = True
|
||||
|
Loading…
Reference in New Issue
Block a user