From 05efc9140980f4337df9f37865782331770725bb Mon Sep 17 00:00:00 2001 From: wyzula-jan Date: Wed, 30 Oct 2024 14:36:51 +0100 Subject: [PATCH] fix(colormap_widget): "None" removed from the menu --- bec_widgets/widgets/colormap_widget/colormap_widget.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bec_widgets/widgets/colormap_widget/colormap_widget.py b/bec_widgets/widgets/colormap_widget/colormap_widget.py index e6af4ee1..f5d1d6f7 100644 --- a/bec_widgets/widgets/colormap_widget/colormap_widget.py +++ b/bec_widgets/widgets/colormap_widget/colormap_widget.py @@ -34,6 +34,10 @@ class BECColorMapWidget(BECWidget, QWidget): self.button.setColorMap(cmap) self._cmap = cmap + # Remove None from the top of the menu + self.button._menu = self.button.getMenu() + self.button._menu.removeAction(self.button._menu.actions()[0]) + # Connect the signal self.button.sigColorMapChanged.connect(self.colormap_changed)