added readable labels

This commit is contained in:
gac-maloja
2021-09-29 20:30:50 +02:00
parent ff7b34bf20
commit 15233e68f6

21
scam.py
View File

@ -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()