From 1a22ce3c0422385121927b8385760501c530ac24 Mon Sep 17 00:00:00 2001 From: Eric Dill Date: Wed, 23 Mar 2016 11:43:44 -0400 Subject: [PATCH 1/2] MNT: Call close() up the inheritance chain --- pyqtgraph/widgets/GraphicsView.py | 3 ++- pyqtgraph/widgets/PlotWidget.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyqtgraph/widgets/GraphicsView.py b/pyqtgraph/widgets/GraphicsView.py index 06015e44..efde07a4 100644 --- a/pyqtgraph/widgets/GraphicsView.py +++ b/pyqtgraph/widgets/GraphicsView.py @@ -165,7 +165,8 @@ class GraphicsView(QtGui.QGraphicsView): self.sceneObj = None self.closed = True self.setViewport(None) - + super(GraphicsView, self).close() + def useOpenGL(self, b=True): if b: if not HAVE_OPENGL: diff --git a/pyqtgraph/widgets/PlotWidget.py b/pyqtgraph/widgets/PlotWidget.py index e27bce60..964307ae 100644 --- a/pyqtgraph/widgets/PlotWidget.py +++ b/pyqtgraph/widgets/PlotWidget.py @@ -69,7 +69,7 @@ class PlotWidget(GraphicsView): #self.scene().clear() #self.mPlotItem.close() self.setParent(None) - GraphicsView.close(self) + super(PlotWidget, self).close() def __getattr__(self, attr): ## implicitly wrap methods from plotItem if hasattr(self.plotItem, attr): From 90d6c9589c511092c5d7e2b618627b5479fa014d Mon Sep 17 00:00:00 2001 From: Eric Dill Date: Mon, 28 Mar 2016 08:18:09 -0400 Subject: [PATCH 2/2] MNT: Call close on the mro for ImageView --- pyqtgraph/imageview/ImageView.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyqtgraph/imageview/ImageView.py b/pyqtgraph/imageview/ImageView.py index 61193fc4..a5e039ca 100644 --- a/pyqtgraph/imageview/ImageView.py +++ b/pyqtgraph/imageview/ImageView.py @@ -372,6 +372,7 @@ class ImageView(QtGui.QWidget): self.scene.clear() del self.image del self.imageDisp + super(ImageView, self).close() self.setParent(None) def keyPressEvent(self, ev):