Commit 11f86f5a95ba283796570f23144c5f382de8cfd0
1 parent
28147eb5
Exists in
master
and in
68 other branches
ENC: Select first item on treelistctrl on import panel
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
invesalius/gui/import_panel.py
... | ... | @@ -93,7 +93,8 @@ class TextPanel(wx.Panel): |
93 | 93 | |
94 | 94 | def Populate(self, patient_list): |
95 | 95 | tree = self.tree |
96 | - | |
96 | + | |
97 | + first = 0 | |
97 | 98 | for patient in patient_list: |
98 | 99 | ngroups = patient.ngroups |
99 | 100 | dicom = patient.GetDicomSample() |
... | ... | @@ -103,6 +104,11 @@ class TextPanel(wx.Panel): |
103 | 104 | |
104 | 105 | parent = tree.AppendItem(self.root, title) |
105 | 106 | |
107 | + if not first: | |
108 | + tree.SelectItem(parent) | |
109 | + first += 1 | |
110 | + | |
111 | + | |
106 | 112 | tree.SetItemText(parent, str(dicom.patient.id), 1) |
107 | 113 | tree.SetItemText(parent, str(dicom.patient.age), 2) |
108 | 114 | tree.SetItemText(parent, str(dicom.patient.gender), 3) | ... | ... |