Commit 9078f46d10f997819bcfe0df34cd8b5df47640b7
1 parent
42914031
Exists in
master
and in
68 other branches
ENH: Temporary win64 fix from dialog of save project
Showing
1 changed file
with
11 additions
and
1 deletions
Show diff stats
invesalius/gui/dialogs.py
| ... | ... | @@ -209,13 +209,23 @@ def ShowSaveAsProjectDialog(default_filename=None): |
| 209 | 209 | #dlg.SetFilterIndex(0) # default is VTI |
| 210 | 210 | |
| 211 | 211 | filename = None |
| 212 | - if dlg.ShowModal() == wx.ID_OK: | |
| 212 | + try: | |
| 213 | + if dlg.ShowModal() == wx.ID_OK: | |
| 214 | + filename = dlg.GetPath() | |
| 215 | + ok = 1 | |
| 216 | + else: | |
| 217 | + ok = 0 | |
| 218 | + except(wx._core.PyAssertionError): #TODO: fix win64 | |
| 213 | 219 | filename = dlg.GetPath() |
| 220 | + ok = 1 | |
| 221 | + | |
| 222 | + if (ok): | |
| 214 | 223 | extension = "inv3" |
| 215 | 224 | if sys.platform != 'win32': |
| 216 | 225 | if filename.split(".")[-1] != extension: |
| 217 | 226 | filename = filename + "." + extension |
| 218 | 227 | |
| 228 | + | |
| 219 | 229 | os.chdir(current_dir) |
| 220 | 230 | return filename |
| 221 | 231 | ... | ... |