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,7 +132,16 @@ class InnerTaskPanel(wx.Panel):
132 def OnLinkNewSurface(self, evt=None): 132 def OnLinkNewSurface(self, evt=None):
133 #import gui.dialogs as dlg 133 #import gui.dialogs as dlg
134 dialog = dlg.NewSurfaceDialog(self, -1, _('InVesalius 3 - New surface')) 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 # Retrieve information from dialog 145 # Retrieve information from dialog
137 (mask_index, surface_name, surface_quality, fill_holes,\ 146 (mask_index, surface_name, surface_quality, fill_holes,\
138 keep_largest) = dialog.GetValue() 147 keep_largest) = dialog.GetValue()
@@ -317,7 +326,7 @@ class SurfaceTools(wx.Panel): @@ -317,7 +326,7 @@ class SurfaceTools(wx.Panel):
317 326
318 def OnLinkSplit(self, evt): 327 def OnLinkSplit(self, evt):
319 self.SplitSurface() 328 self.SplitSurface()
320 - 329 +
321 def OnLinkSeed(self, evt): 330 def OnLinkSeed(self, evt):
322 self.button_seeds.Toggle() 331 self.button_seeds.Toggle()
323 self.SelectSeed() 332 self.SelectSeed()
@@ -332,10 +341,10 @@ class SurfaceTools(wx.Panel): @@ -332,10 +341,10 @@ class SurfaceTools(wx.Panel):
332 self.SelectSeed() 341 self.SelectSeed()
333 342
334 def SelectLargest(self): 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 def SplitSurface(self): 346 def SplitSurface(self):
338 - ps.Publisher().sendMessage('Split surface') 347 + ps.Publisher().sendMessage('Split surface')
339 348
340 def SelectSeed(self): 349 def SelectSeed(self):
341 if self.button_seeds.IsPressed(): 350 if self.button_seeds.IsPressed():
@@ -454,7 +463,7 @@ wx.GROW|wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP|wx.BOTTOM, 10) @@ -454,7 +463,7 @@ wx.GROW|wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP|wx.BOTTOM, 10)
454 if not overwrite or not self.surface_dict: 463 if not overwrite or not self.surface_dict:
455 self.surface_dict[name] = index 464 self.surface_dict[name] = index
456 index = self.combo_surface_name.Append(name) 465 index = self.combo_surface_name.Append(name)
457 - 466 +
458 transparency = 100*pubsub_evt.data[4] 467 transparency = 100*pubsub_evt.data[4]
459 self.button_colour.SetColour(colour) 468 self.button_colour.SetColour(colour)
460 self.slider_transparency.SetValue(transparency) 469 self.slider_transparency.SetValue(transparency)