[GRASS-SVN] r54611 - in grass/trunk/gui/wxpython: core mapdisp

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jan 13 06:57:06 PST 2013


Author: martinl
Date: 2013-01-13 06:57:05 -0800 (Sun, 13 Jan 2013)
New Revision: 54611

Modified:
   grass/trunk/gui/wxpython/core/render.py
   grass/trunk/gui/wxpython/core/ws.py
   grass/trunk/gui/wxpython/mapdisp/frame.py
   grass/trunk/gui/wxpython/mapdisp/mapwindow.py
Log:
wxGUI: fix AbortAllThreads & EVT_UPDATE_PRGBAR
       patch provided by Stepan Turek


Modified: grass/trunk/gui/wxpython/core/render.py
===================================================================
--- grass/trunk/gui/wxpython/core/render.py	2013-01-13 14:54:13 UTC (rev 54610)
+++ grass/trunk/gui/wxpython/core/render.py	2013-01-13 14:57:05 UTC (rev 54611)
@@ -33,19 +33,15 @@
 import types
 
 import wx
-from wx.lib.newevent import NewEvent
 
 from grass.script import core as grass
 
 from core          import utils
+from core.ws       import RenderWMSMgr, wxUpdateProgressBar
 from core.gcmd     import GException, GError, RunCommand
 from core.debug    import Debug
 from core.settings import UserSettings
 
-wxUpdateProgressBar, EVT_UPDATE_PRGBAR = NewEvent()
-
-from core.ws       import RenderWMSMgr
-
 USE_GPNMCOMP = True
 
 class Layer(object):
@@ -1372,8 +1368,7 @@
             if l.GetRenderMgr():
                 l.GetRenderMgr().SetReceiver(self.receiver)
 
-    def AbortAllThreads(self, old_receiver = None):
+    def AbortAllThreads(self):
         """!Abort all layers threads e. g. donwloading data"""
         for l in self.layers + self.overlays:
-            l.AbortThread(old_receiver)
- 
\ No newline at end of file
+            l.AbortThread()

Modified: grass/trunk/gui/wxpython/core/ws.py
===================================================================
--- grass/trunk/gui/wxpython/core/ws.py	2013-01-13 14:54:13 UTC (rev 54610)
+++ grass/trunk/gui/wxpython/core/ws.py	2013-01-13 14:57:05 UTC (rev 54611)
@@ -20,12 +20,12 @@
 import sys
 
 import wx
+from wx.lib.newevent import NewEvent
 
 from grass.script import core as grass
 
 from core          import utils
 from core.events   import gUpdateMap
-from core.render   import wxUpdateProgressBar
 from core.debug    import Debug
 
 from core.gconsole import CmdThread, GStderr, EVT_CMD_DONE, EVT_CMD_OUTPUT
@@ -38,6 +38,8 @@
 except ImportError:
     haveGdal = False
 
+wxUpdateProgressBar, EVT_UPDATE_PRGBAR = NewEvent()
+
 class RenderWMSMgr(wx.EvtHandler):
     """!Fetch and prepare WMS data for rendering.
     """

Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py	2013-01-13 14:54:13 UTC (rev 54610)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py	2013-01-13 14:57:05 UTC (rev 54611)
@@ -35,7 +35,8 @@
 sys.path.append(os.path.join(globalvar.ETCDIR,   "python"))
 
 from core               import globalvar
-from core.render        import EVT_UPDATE_PRGBAR, Map
+from core.render        import Map
+from core.ws            import EVT_UPDATE_PRGBAR
 from vdigit.toolbars    import VDigitToolbar
 from mapdisp.toolbars   import MapToolbar, NvizIcons
 from mapdisp.gprint     import PrintOptions

Modified: grass/trunk/gui/wxpython/mapdisp/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/mapwindow.py	2013-01-13 14:54:13 UTC (rev 54610)
+++ grass/trunk/gui/wxpython/mapdisp/mapwindow.py	2013-01-13 14:57:05 UTC (rev 54611)
@@ -36,7 +36,7 @@
 from core.settings      import UserSettings
 from core.events        import gZoomChanged, EVT_UPDATE_MAP
 from gui_core.mapwindow import MapWindow
-from core.render        import EVT_UPDATE_PRGBAR
+from core.ws            import EVT_UPDATE_PRGBAR
 from core.utils         import GetGEventAttribsForHandler
 
 try:



More information about the grass-commit mailing list