Skip to content

Commit

Permalink
Merge pull request #1231 from girder/histogram-bug
Browse files Browse the repository at this point in the history
Fix a bug calculating some histograms
  • Loading branch information
manthey authored Jun 30, 2023
2 parents 1923dad + ef06729 commit b0681a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Pass style to histogram endpoint as json ([#1220](../../pull/1220))
- Don't show frame controls outside of the geojs viewer ([#1226](../../pull/1226))
- Fix updating the hidden style field for the frame selector ([#1227](../../pull/1227))
- Fix a bug calculating some histograms ([#1231](../../pull/1231))

## 1.23.0

Expand Down
5 changes: 3 additions & 2 deletions large_image/cache_util/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,10 @@ def __call__(cls, *args, **kwargs): # noqa - N805
except KeyError:
pass
# This conditionally copies a non-styled class and adds a style.
if kwargs.get('style') and hasattr(cls, '_setStyle'):
if (kwargs.get('style') and hasattr(cls, '_setStyle') and
kwargs.get('style') != getattr(cls, '_unstyledStyle', None)):
subkwargs = kwargs.copy()
subkwargs.pop('style')
subkwargs['style'] = getattr(cls, '_unstyledStyle', None)
subresult = cls(*args, **subkwargs)
result = subresult.__class__.__new__(subresult.__class__)
with subresult._sourceLock:
Expand Down
2 changes: 2 additions & 0 deletions large_image/tilesource/geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class GDALBaseFileTileSource(GeoBaseFileTileSource):
(rasterio, mapnik, etc.)
"""

_unstyledStyle = '{}'

extensions = {
None: SourcePriority.MEDIUM,
'geotiff': SourcePriority.PREFERRED,
Expand Down

0 comments on commit b0681a6

Please sign in to comment.