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

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Sep 5 09:24:30 EDT 2008


Author: martinl
Date: 2008-09-05 09:24:30 -0400 (Fri, 05 Sep 2008)
New Revision: 33278

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
Log:
wxGUI: bug fix trac #285 (error in table manager -- OnPageChanged)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py	2008-09-05 12:41:04 UTC (rev 33277)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py	2008-09-05 13:24:30 UTC (rev 33278)
@@ -1564,10 +1564,14 @@
         event.Skip()
         
     def OnPageChanged(self, event):
-        if event.GetSelection() == 0:
-            self.log.write(_("Number of loaded records: %d") % \
-                               self.FindWindowById(self.layerPage[self.layer]['data']).\
-                               GetItemCount())
+        try:
+            id = self.layerPage[self.layer]['data']
+        except KeyError:
+            id = None
+        
+        if event.GetSelection() == 0 and id:
+            win = self.FindWindowById(id)
+            self.log.write(_("Number of loaded records: %d") % win.GetItemCount())
         else:
             self.log.write("")
         



More information about the grass-commit mailing list