From 3271e210beddd1fd1fd953af1111810a589f9479 Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Sun, 22 Jul 2012 02:15:16 -0400 Subject: [PATCH] ENH: Move closeEvent definition to base class. --- skimage/viewer/plugins/canny.py | 4 ---- skimage/viewer/plugins/overlayplugin.py | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/skimage/viewer/plugins/canny.py b/skimage/viewer/plugins/canny.py index 278a7931..020157a4 100644 --- a/skimage/viewer/plugins/canny.py +++ b/skimage/viewer/plugins/canny.py @@ -21,7 +21,3 @@ class CannyPlugin(OverlayPlugin): def image_filter(self, *args, **kwargs): image = canny(*args, **kwargs) self.overlay = image - - def closeEvent(self, event): - self.overlay = None - super(CannyPlugin, self).closeEvent(event) diff --git a/skimage/viewer/plugins/overlayplugin.py b/skimage/viewer/plugins/overlayplugin.py index a2b12630..b55d6587 100644 --- a/skimage/viewer/plugins/overlayplugin.py +++ b/skimage/viewer/plugins/overlayplugin.py @@ -35,3 +35,7 @@ class OverlayPlugin(Plugin): else: self._overlay_plot.set_array(image) self.image_viewer.redraw() + + def closeEvent(self, event): + self.overlay = None + super(OverlayPlugin, self).closeEvent(event)