Skip to content

Commit ac35505

Browse files
committed
Catch if the set default colormap hasn't been loaded
1 parent c088cc4 commit ac35505

File tree

1 file changed

+5
-1
lines changed
  • qt/python/mantidqt/mantidqt/widgets/colorbar

1 file changed

+5
-1
lines changed

qt/python/mantidqt/mantidqt/widgets/colorbar/colorbar.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ def set_mappable(self, mappable):
182182
self.colorbar = Colorbar(ax=self.ax, mappable=mappable)
183183
self.cmin_value, self.cmax_value = mappable.get_clim()
184184
self.update_clim_text()
185-
self.cmap_changed(cmap, False)
185+
try:
186+
self.cmap_changed(cmap, False)
187+
except ValueError:
188+
# the default mantid colormap is not available, just use matplotlib default
189+
pass
186190

187191
mappable_cmap = get_current_cmap(mappable)
188192

0 commit comments

Comments
 (0)