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