Merge pull request #300 from ericdill/graphics-view-inheritance
MNT: Call close() up the inheritance chain
This commit is contained in:
commit
dffc2d4e3e
@ -373,6 +373,7 @@ class ImageView(QtGui.QWidget):
|
|||||||
self.scene.clear()
|
self.scene.clear()
|
||||||
del self.image
|
del self.image
|
||||||
del self.imageDisp
|
del self.imageDisp
|
||||||
|
super(ImageView, self).close()
|
||||||
self.setParent(None)
|
self.setParent(None)
|
||||||
|
|
||||||
def keyPressEvent(self, ev):
|
def keyPressEvent(self, ev):
|
||||||
|
@ -165,6 +165,7 @@ class GraphicsView(QtGui.QGraphicsView):
|
|||||||
self.sceneObj = None
|
self.sceneObj = None
|
||||||
self.closed = True
|
self.closed = True
|
||||||
self.setViewport(None)
|
self.setViewport(None)
|
||||||
|
super(GraphicsView, self).close()
|
||||||
|
|
||||||
def useOpenGL(self, b=True):
|
def useOpenGL(self, b=True):
|
||||||
if b:
|
if b:
|
||||||
|
@ -69,7 +69,7 @@ class PlotWidget(GraphicsView):
|
|||||||
#self.scene().clear()
|
#self.scene().clear()
|
||||||
#self.mPlotItem.close()
|
#self.mPlotItem.close()
|
||||||
self.setParent(None)
|
self.setParent(None)
|
||||||
GraphicsView.close(self)
|
super(PlotWidget, self).close()
|
||||||
|
|
||||||
def __getattr__(self, attr): ## implicitly wrap methods from plotItem
|
def __getattr__(self, attr): ## implicitly wrap methods from plotItem
|
||||||
if hasattr(self.plotItem, attr):
|
if hasattr(self.plotItem, attr):
|
||||||
|
Loading…
Reference in New Issue
Block a user