From 85537e3f8557a76b8b2ad89edc41848c29622c24 Mon Sep 17 00:00:00 2001 From: blink1073 Date: Sat, 8 Feb 2014 22:12:01 -0600 Subject: [PATCH] Update the paint tool shape with the viewer image changes --- skimage/viewer/plugins/labelplugin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/skimage/viewer/plugins/labelplugin.py b/skimage/viewer/plugins/labelplugin.py index b3c289f1..06ba2dd9 100644 --- a/skimage/viewer/plugins/labelplugin.py +++ b/skimage/viewer/plugins/labelplugin.py @@ -43,6 +43,10 @@ class LabelPainter(Plugin): self.paint_tool.label = self._label_widget.index = 1 self.artists.append(self.paint_tool) + def _on_new_image(self, image): + """Update plugin for new images.""" + self.paint_tool.shape = image.shape + def on_enter(self, overlay): pass