From 5e23a43f87a07f6f7d04be9e8edd4f3943609c8d Mon Sep 17 00:00:00 2001 From: Shekar V Date: Wed, 18 Oct 2023 12:57:48 -0400 Subject: [PATCH 1/2] Fixed displaying puck name with proposal number --- gui/dewar_tree.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/dewar_tree.py b/gui/dewar_tree.py index 02fbc03c..474e1d62 100644 --- a/gui/dewar_tree.py +++ b/gui/dewar_tree.py @@ -181,7 +181,8 @@ def add_samples_to_puck_tree( ) return - parentItem.setText(f"{index_label} pass-{sample['proposalID']}") + if not parentItem.text().endswith(f"pass-{sample['proposalID']}"): + parentItem.setText(f"{parentItem.text()} pass-{sample['proposalID']}") position_s = f'{j+1}-{sample.get("name", "")}' item = QtGui.QStandardItem( From 060b810c9b98247e4d33f016ca80fdfeb5adb858 Mon Sep 17 00:00:00 2001 From: vshekar1 Date: Thu, 19 Oct 2023 15:48:48 -0400 Subject: [PATCH 2/2] Added formatting to proposal id --- gui/dewar_tree.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gui/dewar_tree.py b/gui/dewar_tree.py index 474e1d62..186b1f03 100644 --- a/gui/dewar_tree.py +++ b/gui/dewar_tree.py @@ -181,8 +181,9 @@ def add_samples_to_puck_tree( ) return - if not parentItem.text().endswith(f"pass-{sample['proposalID']}"): - parentItem.setText(f"{parentItem.text()} pass-{sample['proposalID']}") + proposal_id_text = f"(pass-{sample['proposalID']})" + if not parentItem.text().endswith(proposal_id_text): + parentItem.setText(f"{parentItem.text()} -- {proposal_id_text}") position_s = f'{j+1}-{sample.get("name", "")}' item = QtGui.QStandardItem(