Skip to content

Commit

Permalink
Fixed if statement logic
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Feb 21, 2024
1 parent 7a474b2 commit 822a9dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glue/viewers/image/composite_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def __call__(self, bounds=None):
# Check what the smallest colormap alpha value for this layer is
# - if it is 1 then this colormap does not change transparency,
# and this allows us to speed things up a little.
if layer_cmap(CMAP_SAMPLING)[:, 3].min() == 1 and bad_alpha == 1:
if layer_cmap(CMAP_SAMPLING)[:, 3].min() == 1 and (not self._allow_bad_alpha or bad_alpha == 1):
if layer['alpha'] == 1:
img[...] = 0
else:
Expand Down

0 comments on commit 822a9dc

Please sign in to comment.