Explorar o código

wxGUI: fix calling wx.EndBusyCursor() on Windows (render in threads)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65227 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa %!s(int64=10) %!d(string=hai) anos
pai
achega
3e7046ab1e
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      gui/wxpython/core/render.py

+ 4 - 2
gui/wxpython/core/render.py

@@ -533,7 +533,8 @@ class RenderMapMgr(wx.EvtHandler):
                    (stop - self._startTime, stop - startCompTime))
         
         self._rendering = False
-        wx.EndBusyCursor()
+        if wx.IsBusy():
+            wx.EndBusyCursor()
         
         self.updateMap.emit()
 
@@ -544,7 +545,8 @@ class RenderMapMgr(wx.EvtHandler):
             layer.GetRenderMgr().Abort()
 
         self._init()
-        wx.EndBusyCursor()
+        if wx.IsBusy():
+            wx.EndBusyCursor()
         self.updateProgress.emit(range=0, value=0, text=_("Rendering aborted"))
         
     def ReportProgress(self, layer=None):