[GRASS-SVN] r32883 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 19 06:51:40 EDT 2008


Author: martinl
Date: 2008-08-19 06:51:40 -0400 (Tue, 19 Aug 2008)
New Revision: 32883

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
Log:
wxGUI: update list of columns (rename) on new column (patch by giohappy)

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py	2008-08-19 10:43:10 UTC (rev 32882)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py	2008-08-19 10:51:40 UTC (rev 32883)
@@ -1409,6 +1409,7 @@
 
     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,10 +1455,14 @@
 
         # 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"""
         pageNum = event.GetSelection()



More information about the grass-commit mailing list