Commit fd6f8eae7a736841804f7e5a6ac21e633ff8a5fa

Authored by Paulo Henrique Junqueira Amorim
1 parent 32adc68e

FIX: Bug in the cancel load of the files

Showing 1 changed file with 6 additions and 3 deletions   Show diff stats
invesalius/gui/import_panel.py
... ... @@ -137,6 +137,8 @@ class TextPanel(wx.Panel):
137 137  
138 138 first = 0
139 139 for patient in patient_list:
  140 + if not isinstance(patient, dcm.PatientGroup):
  141 + return None
140 142 ngroups = patient.ngroups
141 143 dicom = patient.GetDicomSample()
142 144 title = dicom.patient.name + " (%d series)"%(ngroups)
... ... @@ -307,9 +309,10 @@ class SeriesPanel(wx.Panel):
307 309  
308 310 def ShowDicomSeries(self, pubsub_evt):
309 311 patient = pubsub_evt.data
310   - self.serie_preview.SetPatientGroups(patient)
311   - self.dicom_preview.SetPatientGroups(patient)
312   -
  312 + if isinstance(patient, dcm.PatientGroup):
  313 + self.serie_preview.SetPatientGroups(patient)
  314 + self.dicom_preview.SetPatientGroups(patient)
  315 +
313 316  
314 317  
315 318 class SlicePanel(wx.Panel):
... ...