[GRASS-SVN] r37426 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 24 11:08:20 EDT 2009


Author: martinl
Date: 2009-05-24 11:08:20 -0400 (Sun, 24 May 2009)
New Revision: 37426

Modified:
   grass/trunk/gui/wxpython/gui_modules/goutput.py
   grass/trunk/gui/wxpython/gui_modules/prompt.py
Log:
wxGUI/prompt: minor fixes


Modified: grass/trunk/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/goutput.py	2009-05-24 14:10:01 UTC (rev 37425)
+++ grass/trunk/gui/wxpython/gui_modules/goutput.py	2009-05-24 15:08:20 UTC (rev 37426)
@@ -101,9 +101,10 @@
                               time = requestTime,
                               pid = requestId,
                               onDone = onDone)
+
+            # send event
+            wx.PostEvent(self.parent, event)
             
-            wx.PostEvent(self.parent, event)
-
     def abort(self):
         self.requestCmd.abort()
     
@@ -517,8 +518,11 @@
 
         self.cmd_output_timer.Stop()
 
-        # updated command dialog
-        if hasattr(self.parent.parent, "btn_run"):
+        # set focus on prompt
+        if self.parent.GetName() == "LayerManager":
+            self.parent.cmdinput.SetFocus()
+        else:
+            # updated command dialog
             dialog = self.parent.parent
 
             if hasattr(self.parent.parent, "btn_abort"):

Modified: grass/trunk/gui/wxpython/gui_modules/prompt.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/prompt.py	2009-05-24 14:10:01 UTC (rev 37425)
+++ grass/trunk/gui/wxpython/gui_modules/prompt.py	2009-05-24 15:08:20 UTC (rev 37426)
@@ -396,7 +396,13 @@
             self.dropdownlistbox.Select(self.dropdownlistbox.GetFirstSelected(), False)
             if self._hideOnNoMatch:
                 self._showDropDown(False)
-        
+            
+            if self._module and cmd[-1][-2] == '=':
+                optType = self._module.get_param(cmd[-1][:-2])['prompt']
+                if optType in ('raster', 'vector'):
+                    # -> raster/vector map
+                    self.SetChoices(self._choicesMap[optType], optType)
+                                            
         self._listItemVisible()
         
         event.Skip()



More information about the grass-commit mailing list