From 0903730348938a9f430d6aebc02439a8d140d619 Mon Sep 17 00:00:00 2001 From: alanphys Date: Fri, 28 May 2021 12:02:19 +0200 Subject: [PATCH] fix picket fence gui new mlc class --- pylinac/py_gui.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pylinac/py_gui.py b/pylinac/py_gui.py index 78d846c8b..80881b447 100644 --- a/pylinac/py_gui.py +++ b/pylinac/py_gui.py @@ -133,6 +133,9 @@ def analyze_pf(): self.pf_pickets = IntVar(value=10) self.pf_pdf = StringVar() self.pf_mlc = StringVar() + mlc_list = [] + for mlc in picketfence.MLC: + mlc_list.append(mlc.value.get('name')) Checkbutton(self.pf_tab, text='Apply median filter', variable=self.pf_filter).grid(column=1, row=3) Button(self.pf_tab, text='Load File...', command=load_file).grid(column=1, row=1) Label(self.pf_tab, text='File:').grid(column=1, row=2) @@ -144,7 +147,7 @@ def analyze_pf(): Label(self.pf_tab, text='Number of pickets:').grid(column=1, row=6) Entry(self.pf_tab, width=7, textvariable=self.pf_pickets).grid(column=2, row=6) Label(self.pf_tab, text='MLC type:').grid(column=1, row=7) - Combobox(self.pf_tab, values=list(picketfence.MLCs.keys()), textvariable=self.pf_mlc, state='readonly').grid(column=2, row=7) + Combobox(self.pf_tab, values=mlc_list, textvariable=self.pf_mlc, state='readonly').grid(column=2, row=7) Button(self.pf_tab, text='Analyze', command=analyze_pf).grid(column=1, row=8) Label(self.pf_tab, text='Analysis will analyze the file according to the settings, \nsave a PDF in the same directory as the original file location and then open it.').grid(column=1, row=9) self.notebook.add(self.pf_tab, text='Picket Fence')