From 15233e68f6f2a80915b4ba067b7a65c55867bbe9 Mon Sep 17 00:00:00 2001 From: gac-maloja Date: Wed, 29 Sep 2021 20:30:50 +0200 Subject: [PATCH] added readable labels --- scam.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/scam.py b/scam.py index d35fa95..7e6f9e5 100755 --- a/scam.py +++ b/scam.py @@ -7,14 +7,14 @@ parser.add_argument("-a", "--all", dest="show_all_settings", action="store_true" clargs = parser.parse_args() -SHOWN_SETTINGS = [ - "image_background", - "image_background_enable", - "image_threshold", - "project_axis", - "roi_background", - "roi_signal" -] +SHOWN_SETTINGS = { + "image_background": "Background", + "image_background_enable": "image_background_enable", + "image_threshold": "image_threshold", + "project_axis": "Projection axis", + "roi_background": "ROI Background", + "roi_signal": "ROI Signal" +} import wx @@ -100,11 +100,10 @@ class MainPanel(wx.Panel): self.btn_save.Enable() if clargs.show_all_settings: - filtered_cfg = cfg + self.entries.update(cfg) else: filtered_cfg = {k: v for k, v in cfg.items() if k in SHOWN_SETTINGS} - - self.entries.update(filtered_cfg) + self.entries.update(filtered_cfg, SHOWN_SETTINGS) self._adjust_size()