[GRASS-SVN] r33279 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 5 09:26:43 EDT 2008
Author: martinl
Date: 2008-09-05 09:26:43 -0400 (Fri, 05 Sep 2008)
New Revision: 33279
Modified:
grass/trunk/gui/wxpython/gui_modules/dbm.py
Log:
wxGUI: bug fix trac #285 (error in table manager -- OnPageChanged)
(merge from devbr6, r33278)
Modified: grass/trunk/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/dbm.py 2008-09-05 13:24:30 UTC (rev 33278)
+++ grass/trunk/gui/wxpython/gui_modules/dbm.py 2008-09-05 13:26:43 UTC (rev 33279)
@@ -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