浏览代码

wxGUI: update list of columns (rename) on new column (patch by giohappy)
(merge from devbr6, https://trac.osgeo.org/grass/changeset/32883)


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

Martin Landa 16 年之前
父节点
当前提交
795c10a471
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      gui/wxpython/gui_modules/dbm.py

+ 6 - 1
gui/wxpython/gui_modules/dbm.py

@@ -1409,6 +1409,7 @@ class AttributeManager(wx.Frame):
 
     def OnTableItemAdd(self, event):
         """Add new column to the table"""
+	table = self.mapDBInfo.layers[self.layer]['table']
         name = self.FindWindowById(self.layerPage[self.layer]['addColName']).GetValue()
 
         if not name:
@@ -1454,9 +1455,13 @@ class AttributeManager(wx.Frame):
 
         # apply changes
         self.ApplyCommands()
-
+        
         # update widgets
         self.FindWindowById(self.layerPage[self.layer]['addColName']).SetValue('')
+	self.FindWindowById(self.layerPage[self.layer]['renameCol']).SetItems(self.mapDBInfo.GetColumns(table))
+        self.FindWindowById(self.layerPage[self.layer]['renameCol']).SetSelection(0)
+        
+        event.Skip()
         
     def OnLayerPageChanged(self, event):
         """Layer tab changed"""