[GRASS-SVN] r44103 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Oct 30 11:52:25 EDT 2010


Author: martinl
Date: 2010-10-30 08:52:25 -0700 (Sat, 30 Oct 2010)
New Revision: 44103

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py
Log:
fix r44102


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py	2010-10-30 15:44:02 UTC (rev 44102)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py	2010-10-30 15:52:25 UTC (rev 44103)
@@ -698,32 +698,30 @@
         self.console_progressbar.SetValue(0) # reset progress bar on '0%'
 
         self.cmd_output_timer.Stop()
-
-        # set focus on prompt
-        if self.parent.GetName() == "LayerManager" and \
-                event.cmd[0] in globalvar.grassCmd['all']:
+        
+        if self.parent.GetName() == "LayerManager":
             self.btn_abort.Enable(False)
+            if event.cmd[0] not in globalvar.grassCmd['all']:
+                return
             display = self.parent.GetLayerTree().GetMapDisplay()
-            if display and display.IsAutoRendered():
-                mapLayers = map(lambda x: x.GetName(),
-                                display.GetRender().GetListOfLayers(l_type = 'raster') +
-                                display.GetRender().GetListOfLayers(l_type = 'vector'))
-                
-                task = menuform.GUI().ParseCommand(event.cmd, show = None)
-                for p in task.get_options()['params']:
-                    if p.get('prompt', '') not in ('raster', 'vector'):
-                        continue
-                    mapName = p.get('value', '')
-                    if '@' not in mapName:
-                        mapName = mapName + '@' + grass.gisenv()['MAPSET']
-                    if mapName in mapLayers:
-                        display.GetWindow().UpdateMap(render = True)
-                        return
+            if not display or not display.IsAutoRendered():
+                return
+            mapLayers = map(lambda x: x.GetName(),
+                            display.GetRender().GetListOfLayers(l_type = 'raster') +
+                            display.GetRender().GetListOfLayers(l_type = 'vector'))
             
-        else:
-            # updated command dialog
+            task = menuform.GUI().ParseCommand(event.cmd, show = None)
+            for p in task.get_options()['params']:
+                if p.get('prompt', '') not in ('raster', 'vector'):
+                    continue
+                mapName = p.get('value', '')
+                if '@' not in mapName:
+                    mapName = mapName + '@' + grass.gisenv()['MAPSET']
+                if mapName in mapLayers:
+                    display.GetWindow().UpdateMap(render = True)
+                    return
+        else: # standalone dialogs
             dialog = self.parent.parent
-
             if hasattr(self.parent.parent, "btn_abort"):
                 dialog.btn_abort.Enable(False)
             
@@ -783,8 +781,6 @@
                 time.sleep(1)
                 dialog.Close()
         
-        event.Skip()
-        
     def OnProcessPendingOutputWindowEvents(self, event):
         self.ProcessPendingEvents()
 



More information about the grass-commit mailing list