Commit 9078f46d10f997819bcfe0df34cd8b5df47640b7

Authored by Paulo Henrique Junqueira Amorim
1 parent 42914031

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,13 +209,23 @@ def ShowSaveAsProjectDialog(default_filename=None):
209 #dlg.SetFilterIndex(0) # default is VTI 209 #dlg.SetFilterIndex(0) # default is VTI
210 210
211 filename = None 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 filename = dlg.GetPath() 219 filename = dlg.GetPath()
  220 + ok = 1
  221 +
  222 + if (ok):
214 extension = "inv3" 223 extension = "inv3"
215 if sys.platform != 'win32': 224 if sys.platform != 'win32':
216 if filename.split(".")[-1] != extension: 225 if filename.split(".")[-1] != extension:
217 filename = filename + "." + extension 226 filename = filename + "." + extension
218 227
  228 +
219 os.chdir(current_dir) 229 os.chdir(current_dir)
220 return filename 230 return filename
221 231