Commit 6ffe6161 authored by Marius Kriegerowski's avatar Marius Kriegerowski
Browse files

snufflings: hold figure after closing figure frame

parent aa979ed4
......@@ -92,6 +92,7 @@ class LassieSnuffling(Snuffling):
self.set_live_update(True)
self.markers_compare = []
self.fig = None
self.fframe = None
def mycleanup(self):
viewer = self.get_viewer()
......@@ -124,6 +125,7 @@ class LassieSnuffling(Snuffling):
event=e, kind=int(self.marker_kind[0])))
self.add_markers(self.detections)
if self.hold_figure:
self.show_comparison()
......@@ -192,10 +194,11 @@ class LassieSnuffling(Snuffling):
for c in candidates:
detections.remove(c)
if self.hold_figure and self.fig:
if self.hold_figure and self.fframe and not self.fframe.closed:
self.fig.clf()
else:
self.fig = self.figure()
self.fframe = self.pylab('Lassie', get='figure_frame')
self.fig = self.fframe.gcf()
ax = self.fig.add_subplot(111)
compare_events = map(lambda x: x.get_event(), markers_compare)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment