Skip to content

Commit

Permalink
Fixed bug related to colormaps when colormap names match but instance…
Browse files Browse the repository at this point in the history
…s don't - this can happen when reloading sessions
  • Loading branch information
astrofrog committed Aug 16, 2024
1 parent f60a598 commit 0a797b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glue/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def __getitem__(self, cmap_name):

def name_from_cmap(self, cmap_desired):
for name, cmap in self.members:
if cmap is cmap_desired:
if cmap is cmap_desired or cmap.name == cmap_desired.name:
return name
raise ValueError("Could not find name for colormap")

Expand Down

0 comments on commit 0a797b4

Please sign in to comment.