From fd6f8eae7a736841804f7e5a6ac21e633ff8a5fa Mon Sep 17 00:00:00 2001 From: paulojamorim Date: Mon, 9 Nov 2009 06:34:29 +0000 Subject: [PATCH] FIX: Bug in the cancel load of the files --- invesalius/gui/import_panel.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/invesalius/gui/import_panel.py b/invesalius/gui/import_panel.py index 0346be9..c596154 100644 --- a/invesalius/gui/import_panel.py +++ b/invesalius/gui/import_panel.py @@ -137,6 +137,8 @@ class TextPanel(wx.Panel): first = 0 for patient in patient_list: + if not isinstance(patient, dcm.PatientGroup): + return None ngroups = patient.ngroups dicom = patient.GetDicomSample() title = dicom.patient.name + " (%d series)"%(ngroups) @@ -307,9 +309,10 @@ class SeriesPanel(wx.Panel): def ShowDicomSeries(self, pubsub_evt): patient = pubsub_evt.data - self.serie_preview.SetPatientGroups(patient) - self.dicom_preview.SetPatientGroups(patient) - + if isinstance(patient, dcm.PatientGroup): + self.serie_preview.SetPatientGroups(patient) + self.dicom_preview.SetPatientGroups(patient) + class SlicePanel(wx.Panel): -- libgit2 0.21.2