Commit 6a79ee28c2eb3d18bf1807dc6f3a98a99af9267c

Authored by Paulo Henrique Junqueira Amorim
1 parent f87a0d42

FIX: Temporary fix to win64 from dialog create surface with properties

Showing 1 changed file with 14 additions and 5 deletions   Show diff stats
invesalius/gui/task_surface.py
... ... @@ -132,7 +132,16 @@ class InnerTaskPanel(wx.Panel):
132 132 def OnLinkNewSurface(self, evt=None):
133 133 #import gui.dialogs as dlg
134 134 dialog = dlg.NewSurfaceDialog(self, -1, _('InVesalius 3 - New surface'))
135   - if dialog.ShowModal() == wx.ID_OK:
  135 +
  136 + try:
  137 + if dialog.ShowModal() == wx.ID_OK:
  138 + ok = 1
  139 + else:
  140 + ok = 0
  141 + except(wx._core.PyAssertionError): #TODO FIX: win64
  142 + ok = 1
  143 +
  144 + if (ok):
136 145 # Retrieve information from dialog
137 146 (mask_index, surface_name, surface_quality, fill_holes,\
138 147 keep_largest) = dialog.GetValue()
... ... @@ -317,7 +326,7 @@ class SurfaceTools(wx.Panel):
317 326  
318 327 def OnLinkSplit(self, evt):
319 328 self.SplitSurface()
320   -
  329 +
321 330 def OnLinkSeed(self, evt):
322 331 self.button_seeds.Toggle()
323 332 self.SelectSeed()
... ... @@ -332,10 +341,10 @@ class SurfaceTools(wx.Panel):
332 341 self.SelectSeed()
333 342  
334 343 def SelectLargest(self):
335   - ps.Publisher().sendMessage('Create surface from largest region')
  344 + ps.Publisher().sendMessage('Create surface from largest region')
336 345  
337 346 def SplitSurface(self):
338   - ps.Publisher().sendMessage('Split surface')
  347 + ps.Publisher().sendMessage('Split surface')
339 348  
340 349 def SelectSeed(self):
341 350 if self.button_seeds.IsPressed():
... ... @@ -454,7 +463,7 @@ wx.GROW|wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP|wx.BOTTOM, 10)
454 463 if not overwrite or not self.surface_dict:
455 464 self.surface_dict[name] = index
456 465 index = self.combo_surface_name.Append(name)
457   -
  466 +
458 467 transparency = 100*pubsub_evt.data[4]
459 468 self.button_colour.SetColour(colour)
460 469 self.slider_transparency.SetValue(transparency)
... ...