Skip to content

Commit

Permalink
Merge pull request #167 from molssi-seamm/dev
Browse files Browse the repository at this point in the history
Bugfix: JSON checkbox in Results tab not set correctly.
  • Loading branch information
seamm committed May 3, 2024
2 parents 040fd72 + 5bcb0c2 commit 72b97f8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
=======
History
=======
2024.5.3.1 -- Bugfix: JSON in Results GUI not set correctly.

2024.5.3 -- Added the time to Results.json
* Adding time into the Results.json file will allow ensuring that the most
recent data is used, when there are duplicates.
Expand Down
12 changes: 11 additions & 1 deletion seamm/tk_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ def handle_dialog(self, result):
for (
key,
w_property,
w_json,
w_check,
w_variable,
w_table,
Expand Down Expand Up @@ -763,6 +764,12 @@ def handle_dialog(self, result):
else:
self.tk_var["property " + key]["value"].set(0)

if w_json is not None:
if "json" in tmp:
self.tk_var["json " + key]["value"].set(1)
else:
self.tk_var["json " + key]["value"].set(0)

if w_units is not None:
if "units" in tmp:
w_units.set(tmp["units"])
Expand Down Expand Up @@ -1043,7 +1050,10 @@ def setup_results(self):

# JSON
var = self.tk_var["json " + key] = tk.IntVar()
var.set(0)
if key in results and "json" in results[key]:
var.set(1)
else:
var.set(0)
w = ttk.Checkbutton(frame, variable=var)
table.cell(row, 4, w)
widgets.append(w)
Expand Down

0 comments on commit 72b97f8

Please sign in to comment.