diff --git a/CHANGELOG.md b/CHANGELOG.md index d43a0eece..a70b196f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Improvements - Harden the nd2 source to allow it to read more files ([#1207](../../pull/1207)) - Add ipyleaflet representation for JupyterLab ([#1065](../../pull/1065)) +- When restyling a source, share band range calculations ([#1215](../../pull/1215)) ### Changes - Change how extensions and fallback priorities in Girder interact ([#1208](../../pull/1208)) diff --git a/large_image/tilesource/base.py b/large_image/tilesource/base.py index d0b3ae73c..0a80f0cdb 100644 --- a/large_image/tilesource/base.py +++ b/large_image/tilesource/base.py @@ -193,7 +193,8 @@ def _setStyle(self, style): delattr(self, key) except Exception: pass - self._bandRanges = {} + if not hasattr(self, '_bandRanges'): + self._bandRanges = {} self._jsonstyle = style if style is not None: if isinstance(style, dict):