[GRASS-SVN] r65328 - grass/trunk/gui/wxpython/core

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 26 06:19:24 PDT 2015


Author: martinl
Date: 2015-05-26 06:19:24 -0700 (Tue, 26 May 2015)
New Revision: 65328

Modified:
   grass/trunk/gui/wxpython/core/gthread.py
   grass/trunk/gui/wxpython/core/render.py
Log:
wxGUI: fix aborting render threads

Modified: grass/trunk/gui/wxpython/core/gthread.py
===================================================================
--- grass/trunk/gui/wxpython/core/gthread.py	2015-05-26 12:49:44 UTC (rev 65327)
+++ grass/trunk/gui/wxpython/core/gthread.py	2015-05-26 13:19:24 UTC (rev 65328)
@@ -115,6 +115,6 @@
         if event.ondone:
             event.ondone(event)
 
-    def Terminate(self):
+    def Terminate(self, terminate=True):
         """Abort command(s)"""
-        self.terminate = True
+        self.terminate = terminate

Modified: grass/trunk/gui/wxpython/core/render.py
===================================================================
--- grass/trunk/gui/wxpython/core/render.py	2015-05-26 12:49:44 UTC (rev 65327)
+++ grass/trunk/gui/wxpython/core/render.py	2015-05-26 13:19:24 UTC (rev 65328)
@@ -388,7 +388,11 @@
         """Abort rendering process"""
         Debug.msg(1, "RenderLayerMgr({}).Abort()".format(self.layer))
         self.thread.Terminate()
-
+        
+        # force rendering layer next time
+        self.layer.forceRender = True
+        self.thread.Terminate(False)
+        
     def IsDownloading(self):
         """Is downloading
 



More information about the grass-commit mailing list