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:
Luke Campagnola 2017-09-18 13:31:32 -07:00
parent 9d0779cc32
commit 4beea8a153

View File

@ -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