added readable labels
This commit is contained in:
21
scam.py
21
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()
|
||||
|
||||
|
Reference in New Issue
Block a user