Commit 0ea8820aee0a177ee2bf667fa15388f4ab64a25c
1 parent
523a69ac
Exists in
master
When importing non DICOM files the filepath was being used as project name
Showing
1 changed file
with
2 additions
and
4 deletions
Show diff stats
invesalius/control.py
... | ... | @@ -872,13 +872,11 @@ class Controller(): |
872 | 872 | def OnOpenOtherFiles(self, filepath): |
873 | 873 | filepath = utils.decode(filepath, const.FS_ENCODE) |
874 | 874 | if not(filepath) == None: |
875 | - name = filepath.rpartition('\\')[-1].split('.') | |
876 | - | |
875 | + name = os.path.basename(filepath).split(".")[0] | |
877 | 876 | group = oth.ReadOthers(filepath) |
878 | - | |
879 | 877 | if group: |
880 | 878 | matrix, matrix_filename = self.OpenOtherFiles(group) |
881 | - self.CreateOtherProject(str(name[0]), matrix, matrix_filename) | |
879 | + self.CreateOtherProject(name, matrix, matrix_filename) | |
882 | 880 | self.LoadProject() |
883 | 881 | Publisher.sendMessage("Enable state project", state=True) |
884 | 882 | else: | ... | ... |