[GRASS-SVN] r50709 - grass/branches/develbranch_6/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 7 08:16:18 EST 2012


Author: martinl
Date: 2012-02-07 05:16:18 -0800 (Tue, 07 Feb 2012)
New Revision: 50709

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_core/forms.py
   grass/branches/develbranch_6/gui/wxpython/gui_core/gselect.py
Log:
wxGUI: SubGroupSelect widget should be editable
       (merge r50707 & r50708 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_core/forms.py	2012-02-07 13:13:35 UTC (rev 50708)
+++ grass/branches/develbranch_6/gui/wxpython/gui_core/forms.py	2012-02-07 13:16:18 UTC (rev 50709)
@@ -211,6 +211,9 @@
                 continue
             
             name = win.GetName()
+            pBind = self.task.get_param(uid, element = 'wxId', raiseError = False)
+            if pBind:
+                pBind['value'] = ''
             
             if name == 'LayerSelect':
                 if map in cparams and not cparams[map]['layers']:
@@ -265,9 +268,7 @@
                             self.data[win.InsertTableColumns] = { 'table'  : pTable.get('value') }
             
             elif name == 'SubGroupSelect':
-                pGroup = self.task.get_param('group', element = 'element', raiseError = False)
-                if pGroup:
-                    self.data[win.Insert] = { 'group' : pGroup.get('value', '')}
+                self.data[win.Insert] = { 'group' : p.get('value', '')}
             
             elif name == 'LocationSelect':
                 pDbase = self.task.get_param('dbase', element = 'element', raiseError = False)
@@ -1129,6 +1130,7 @@
                     selection = gselect.SubGroupSelect(parent = which_panel)
                     p['wxId'] = [ selection.GetId() ]
                     selection.Bind(wx.EVT_COMBOBOX, self.OnSetValue)
+                    selection.Bind(wx.EVT_TEXT,     self.OnSetValue)
                     which_sizer.Add(item = selection, proportion = 0,
                                     flag = wx.ADJUST_MINSIZE | wx.BOTTOM | wx.LEFT | wx.RIGHT | wx.TOP | wx.ALIGN_CENTER_VERTICAL,
                                     border = 5)
@@ -1679,7 +1681,7 @@
         myId = event.GetId()
         me = wx.FindWindowById(myId)
         name = me.GetName()
-
+        
         found = False
         for porf in self.task.params + self.task.flags:
             if 'wxId' not in porf:

Modified: grass/branches/develbranch_6/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_core/gselect.py	2012-02-07 13:13:35 UTC (rev 50708)
+++ grass/branches/develbranch_6/gui/wxpython/gui_core/gselect.py	2012-02-07 13:16:18 UTC (rev 50709)
@@ -964,7 +964,7 @@
     def __init__(self, parent, id = wx.ID_ANY, size = globalvar.DIALOG_GSELECT_SIZE, 
                  **kwargs):
         super(SubGroupSelect, self).__init__(parent, id, size = size, 
-                                             style = wx.CB_READONLY, **kwargs)
+                                             **kwargs)
         self.SetName("SubGroupSelect")
 
     def Insert(self, group):



More information about the grass-commit mailing list