Commit c510d7335602fdd765528cc1569a67278d714c74

Authored by Paulo Henrique Junqueira Amorim
1 parent 1391fdd6

ENH: Busy cursor in the surface generation

invesalius/data/surface.py
@@ -171,7 +171,7 @@ class SurfaceManager(): @@ -171,7 +171,7 @@ class SurfaceManager():
171 imagedata, colour, [min_value, max_value], edited_points = pubsub_evt.data 171 imagedata, colour, [min_value, max_value], edited_points = pubsub_evt.data
172 quality=_('Optimal *') 172 quality=_('Optimal *')
173 mode = 'CONTOUR' # 'GRAYSCALE' 173 mode = 'CONTOUR' # 'GRAYSCALE'
174 - 174 + ps.Publisher().sendMessage('Begin busy cursor')
175 imagedata_tmp = None 175 imagedata_tmp = None
176 if (edited_points): 176 if (edited_points):
177 imagedata_tmp = vtk.vtkImageData() 177 imagedata_tmp = vtk.vtkImageData()
@@ -294,7 +294,7 @@ class SurfaceManager(): @@ -294,7 +294,7 @@ class SurfaceManager():
294 294
295 ps.Publisher().sendMessage('Update status text in GUI', 295 ps.Publisher().sendMessage('Update status text in GUI',
296 "Surface created.") 296 "Surface created.")
297 - 297 +
298 # The following lines have to be here, otherwise all volumes disappear 298 # The following lines have to be here, otherwise all volumes disappear
299 measured_polydata = vtk.vtkMassProperties() 299 measured_polydata = vtk.vtkMassProperties()
300 measured_polydata.SetInput(polydata) 300 measured_polydata.SetInput(polydata)
@@ -309,7 +309,9 @@ class SurfaceManager(): @@ -309,7 +309,9 @@ class SurfaceManager():
309 #Destroy Copy original imagedata 309 #Destroy Copy original imagedata
310 if(imagedata_tmp): 310 if(imagedata_tmp):
311 del imagedata_tmp 311 del imagedata_tmp
312 - 312 +
  313 + ps.Publisher().sendMessage('End busy cursor')
  314 +
313 def RemoveActor(self, index): 315 def RemoveActor(self, index):
314 """ 316 """
315 Remove actor, according to given actor index. 317 Remove actor, according to given actor index.
invesalius/gui/frame.py
@@ -440,7 +440,8 @@ class StatusBar(wx.StatusBar): @@ -440,7 +440,8 @@ class StatusBar(wx.StatusBar):
440 self.SetStatusText("",0) 440 self.SetStatusText("",0)
441 if sys.platform == 'win32': 441 if sys.platform == 'win32':
442 try: 442 try:
443 - wx.SafeYield() 443 + #wx.SafeYield()
  444 + wx.Yield()
444 #TODO: temporary fix necessary in the Windows XP 64 Bits 445 #TODO: temporary fix necessary in the Windows XP 64 Bits
445 #BUG in wxWidgets http://trac.wxwidgets.org/ticket/10896 446 #BUG in wxWidgets http://trac.wxwidgets.org/ticket/10896
446 except(wx._core.PyAssertionError): 447 except(wx._core.PyAssertionError):