From eaf6b4d9cedf9ee2562d7d3b8ab6517e568835eb Mon Sep 17 00:00:00 2001 From: David Manthey Date: Wed, 12 Feb 2020 10:14:08 -0500 Subject: [PATCH] Work around an issue with Girder's settings' cache. --- CHANGELOG.md | 5 ++++- .../girder_large_image_annotation/models/annotation.py | 6 ++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e511c3daf..7da38b91e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,10 @@ ## Unreleased ### Features -- Added a GET large_image/sources endpoint to list versions of all installed sources +- Added a GET large_image/sources endpoint to list versions of all installed sources (#421) + +### Bug Fixes +- Fixed an issue where changing the annotation history setting when Girder's settings' cache was enable wouldn't take effect until after a restart (#422) ## Version 1.0.2 diff --git a/girder_annotation/girder_large_image_annotation/models/annotation.py b/girder_annotation/girder_large_image_annotation/models/annotation.py index dd2b27db6..24cbc8d09 100644 --- a/girder_annotation/girder_large_image_annotation/models/annotation.py +++ b/girder_annotation/girder_large_image_annotation/models/annotation.py @@ -502,10 +502,8 @@ def _copyAnnotationsFromOtherItem(self, srcItemId, destItem): def _onSettingChange(self, event): settingDoc = event.info - if settingDoc['key'] in ( - constants.PluginSettings.LARGE_IMAGE_ANNOTATION_HISTORY, ): - self._historyEnabled = Setting().get( - constants.PluginSettings.LARGE_IMAGE_ANNOTATION_HISTORY) + if settingDoc['key'] == constants.PluginSettings.LARGE_IMAGE_ANNOTATION_HISTORY: + self._historyEnabled = settingDoc['value'] def _loadAndMigrateAnnotation(self, id, *args, **kwargs): """