Commit 96d2a541a668b5f484916b3ef916278877fe7d0b
1 parent
c0cefa15
Exists in
phoenix
About dialog working again
Showing
2 changed files
with
14 additions
and
7 deletions
Show diff stats
invesalius/data/slice_.py
... | ... | @@ -267,10 +267,12 @@ class Slice(object): |
267 | 267 | self.CloseProject() |
268 | 268 | |
269 | 269 | def CloseProject(self): |
270 | - f = self._matrix.filename | |
271 | - self._matrix._mmap.close() | |
272 | - self._matrix = None | |
273 | - os.remove(f) | |
270 | + if self._matrix is not None: | |
271 | + f = self._matrix.filename | |
272 | + self._matrix._mmap.close() | |
273 | + self._matrix = None | |
274 | + os.remove(f) | |
275 | + | |
274 | 276 | self.current_mask = None |
275 | 277 | |
276 | 278 | for name in self.aux_matrices: | ... | ... |
invesalius/gui/dialogs.py
... | ... | @@ -1059,8 +1059,10 @@ def SaveChangesDialog2(filename): |
1059 | 1059 | |
1060 | 1060 | |
1061 | 1061 | def ShowAboutDialog(parent): |
1062 | - | |
1063 | - info = wx.AboutDialogInfo() | |
1062 | + try: | |
1063 | + info = wx.adv.AboutDialogInfo() | |
1064 | + except AttributeError: | |
1065 | + info = wx.AboutDialogInfo() | |
1064 | 1066 | info.Name = "InVesalius" |
1065 | 1067 | info.Version = "3.1" |
1066 | 1068 | info.Copyright = _("(c) 2007-2017 Center for Information Technology Renato Archer - CTI") |
... | ... | @@ -1107,7 +1109,10 @@ def ShowAboutDialog(parent): |
1107 | 1109 | info.Artists = ["Otavio Henrique Junqueira Amorim"] |
1108 | 1110 | |
1109 | 1111 | # Then we call wx.AboutBox providing its info object |
1110 | - wx.AboutBox(info) | |
1112 | + try: | |
1113 | + wx.adv.AboutBox(info) | |
1114 | + except AttributeError: | |
1115 | + wx.AboutBox(info) | |
1111 | 1116 | |
1112 | 1117 | |
1113 | 1118 | def ShowSavePresetDialog(default_filename="raycasting"): | ... | ... |