Merge pull request #735 from campagnola/fix-exit-error
Fix exit error caused by callback invoked during Qt teardown
This commit is contained in:
commit
240889c460
@ -445,6 +445,10 @@ class GraphicsItem(object):
|
|||||||
## called to see whether this item has a new view to connect to
|
## called to see whether this item has a new view to connect to
|
||||||
## NOTE: This is called from GraphicsObject.itemChange or GraphicsWidget.itemChange.
|
## NOTE: This is called from GraphicsObject.itemChange or GraphicsWidget.itemChange.
|
||||||
|
|
||||||
|
if not hasattr(self, '_connectedView'):
|
||||||
|
# Happens when Python is shutting down.
|
||||||
|
return
|
||||||
|
|
||||||
## It is possible this item has moved to a different ViewBox or widget;
|
## It is possible this item has moved to a different ViewBox or widget;
|
||||||
## clear out previously determined references to these.
|
## clear out previously determined references to these.
|
||||||
self.forgetViewBox()
|
self.forgetViewBox()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user