فهرست منبع

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):
     def OnTableItemAdd(self, event):
         """Add new column to the table"""
         """Add new column to the table"""
+	table = self.mapDBInfo.layers[self.layer]['table']
         name = self.FindWindowById(self.layerPage[self.layer]['addColName']).GetValue()
         name = self.FindWindowById(self.layerPage[self.layer]['addColName']).GetValue()
 
 
         if not name:
         if not name:
@@ -1454,9 +1455,13 @@ class AttributeManager(wx.Frame):
 
 
         # apply changes
         # apply changes
         self.ApplyCommands()
         self.ApplyCommands()
-
+        
         # update widgets
         # update widgets
         self.FindWindowById(self.layerPage[self.layer]['addColName']).SetValue('')
         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):
     def OnLayerPageChanged(self, event):
         """Layer tab changed"""
         """Layer tab changed"""