From 0ea8820aee0a177ee2bf667fa15388f4ab64a25c Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Thu, 9 Apr 2020 16:41:40 -0300 Subject: [PATCH] When importing non DICOM files the filepath was being used as project name --- invesalius/control.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/invesalius/control.py b/invesalius/control.py index d142e1d..f288077 100644 --- a/invesalius/control.py +++ b/invesalius/control.py @@ -872,13 +872,11 @@ class Controller(): def OnOpenOtherFiles(self, filepath): filepath = utils.decode(filepath, const.FS_ENCODE) if not(filepath) == None: - name = filepath.rpartition('\\')[-1].split('.') - + name = os.path.basename(filepath).split(".")[0] group = oth.ReadOthers(filepath) - if group: matrix, matrix_filename = self.OpenOtherFiles(group) - self.CreateOtherProject(str(name[0]), matrix, matrix_filename) + self.CreateOtherProject(name, matrix, matrix_filename) self.LoadProject() Publisher.sendMessage("Enable state project", state=True) else: -- libgit2 0.21.2