瀏覽代碼

wxGUI: ColumnSelect is not readonly (to unset option)
bugfix https://trac.osgeo.org/grass/ticket/998


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@41420 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 15 年之前
父節點
當前提交
3d26174722
共有 2 個文件被更改,包括 6 次插入6 次删除
  1. 2 3
      gui/wxpython/gui_modules/gselect.py
  2. 4 3
      gui/wxpython/gui_modules/menuform.py

+ 2 - 3
gui/wxpython/gui_modules/gselect.py

@@ -666,9 +666,8 @@ class ColumnSelect(wx.ComboBox):
                  size=globalvar.DIALOG_COMBOBOX_SIZE, vector=None,
                  layer=1, choices=[]):
         
-        super(ColumnSelect, self).__init__(parent, id, value, pos, size, choices,
-                                           style=wx.CB_READONLY)
-
+        super(ColumnSelect, self).__init__(parent, id, value, pos, size, choices)
+        
         self.SetName("ColumnSelect")
 
         if vector:

+ 4 - 3
gui/wxpython/gui_modules/menuform.py

@@ -1446,8 +1446,10 @@ class cmdPanel(wx.Panel):
                                                   size=globalvar.DIALOG_TEXTCTRL_SIZE)
                                 win.Bind(wx.EVT_TEXT, self.OnSetValue)
                         elif p.get('prompt', '') == 'dbcolumn':
-                            win = gselect.ColumnSelect(parent=which_panel)
+                            win = gselect.ColumnSelect(parent = which_panel,
+                                                       value = p.get('default', ''))
                             win.Bind(wx.EVT_COMBOBOX, self.OnSetValue)
+                            win.Bind(wx.EVT_TEXT,     self.OnSetValue)
 
                     try:
                         p['wxId'] = [ win.GetId(), ]
@@ -1779,8 +1781,7 @@ class cmdPanel(wx.Panel):
                         break
                 
                 if found:
-                    if name in ('LayerSelect', 'DriverSelect', 'TableSelect',
-                                'ColumnSelect'):
+                    if name in ('LayerSelect', 'DriverSelect', 'TableSelect'):
                         porf['value'] = me.GetStringSelection()
                     else:
                         porf['value'] = me.GetValue()