Skip to content

Commit c29f802

Browse files
committed
bug fix for save hooks
1 parent c6cd826 commit c29f802

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/annotate/_core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ def on_selection_change(self, key, change):
667667
# First, things first: save the annotations.
668668
self.state.save_annotations()
669669
# Clear the save hooks if there are any.
670-
self.save_hooks = None
670+
self.state.save_hooks = None
671671
# The selection has changed; we need to redraw the image and update the
672672
# annotations.
673673
self.refresh_figure()
@@ -696,7 +696,7 @@ def on_review(self, button):
696696
targ = self.control_panel.target
697697
msg = self.state.generate_review(targ, save_hooks)
698698
self.control_panel.save_button.disabled = False
699-
self.save_hooks = save_hooks
699+
self.state.save_hooks = save_hooks
700700
except Exception as e:
701701
msg = str(e)
702702
self.control_panel.save_button.disabled = True
@@ -720,7 +720,7 @@ def on_edit(self, button):
720720
self.control_panel.edit_button.disabled = True
721721
self.figure_panel.review_end()
722722
self.refresh_figure()
723-
self.save_hooks = None
723+
self.state.save_hooks = None
724724
def __init__(self,
725725
config_path='/config/config.yaml',
726726
cache_path='/cache',

0 commit comments

Comments
 (0)