Merge pull request #914 from j9ac9k/fix-lastScene-signal-reference

Fix attribute lookup reference
This commit is contained in:
Ogi Moore 2019-06-09 18:24:58 -07:00 committed by GitHub
commit 3482a8436c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -277,7 +277,7 @@ class ViewBox(GraphicsWidget):
scene = self.scene()
if scene == self._lastScene:
return
if self._lastScene is not None and hasattr(self.lastScene, 'sigPrepareForPaint'):
if self._lastScene is not None and hasattr(self._lastScene, 'sigPrepareForPaint'):
self._lastScene.sigPrepareForPaint.disconnect(self.prepareForPaint)
if scene is not None and hasattr(scene, 'sigPrepareForPaint'):
scene.sigPrepareForPaint.connect(self.prepareForPaint)