[GRASS-SVN] r33215 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 2 05:44:52 EDT 2008
Author: martinl
Date: 2008-09-02 05:44:52 -0400 (Tue, 02 Sep 2008)
New Revision: 33215
Modified:
grass/trunk/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI: set focus to the first parameter
(merge from devbr6, r33214)
Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py 2008-09-02 09:43:44 UTC (rev 33214)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py 2008-09-02 09:44:52 UTC (rev 33215)
@@ -969,6 +969,12 @@
# parameters
#
visible_params = [ p for p in self.task.params if not p.get( 'hidden', 'no' ) == 'yes' ]
+
+ try:
+ first_param = visible_params[0]
+ except IndexError:
+ first_param = None
+
for p in visible_params:
which_sizer = tabsizer[ p['guisection'] ]
which_panel = tab[ p['guisection'] ]
@@ -1229,6 +1235,9 @@
if tooltip:
txt.SetToolTipString(tooltip)
+ if p == first_param:
+ self.FindWindowById(p['wxId']).SetFocus()
+
#
# determine panel size
#
More information about the grass-commit
mailing list