Skip to content

Commit

Permalink
Small change to active recipe selection
Browse files Browse the repository at this point in the history
- Can now select different parameters in controlpanel even if only one recipe is defined
- Update autolab.pdf to latest version
  • Loading branch information
Python-simulation committed Jul 5, 2024
1 parent 01e4e67 commit f0fef6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Binary file modified autolab/autolab.pdf
Binary file not shown.
7 changes: 5 additions & 2 deletions autolab/core/gui/controlcenter/treewidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@ def __init__(self, gui):
self.param_cb = self.gui.scanner.selectParameter_comboBox if (
self.gui.scanner) else None

self.CUSTOM_ACTION = len(self.recipe_names) > 1
self.HAS_RECIPE = len(self.recipe_names) > 1
self.HAS_PARAM = (self.param_cb.count() > 1 if self.param_cb is not None
else False)

def addAnyAction(self, action_text='', icon_name='',
param_menu_active=False) -> Union[QtWidgets.QWidgetAction,
QtWidgets.QAction]:
if self.CUSTOM_ACTION:

if self.HAS_RECIPE or (self.HAS_PARAM and param_menu_active):
action = self.addCustomAction(action_text, icon_name,
param_menu_active=param_menu_active)
else:
Expand Down

0 comments on commit f0fef6d

Please sign in to comment.