[GRASS-SVN] r59160 - grass/trunk/gui/wxpython/dbmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Mar 2 04:02:47 PST 2014


Author: martinl
Date: 2014-03-02 04:02:46 -0800 (Sun, 02 Mar 2014)
New Revision: 59160

Modified:
   grass/trunk/gui/wxpython/dbmgr/base.py
   grass/trunk/gui/wxpython/dbmgr/manager.py
Log:
wxGUI/dbmgr: fix OnReload


Modified: grass/trunk/gui/wxpython/dbmgr/base.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/base.py	2014-03-01 18:02:38 UTC (rev 59159)
+++ grass/trunk/gui/wxpython/dbmgr/base.py	2014-03-02 12:02:46 UTC (rev 59160)
@@ -1850,7 +1850,8 @@
                            self.FindWindowById(self.layerPage[self.selLayer]['data']).GetItemCount())
 
         # update map display if needed
-        if UserSettings.Get(group = 'atm', key = 'highlight', subkey = 'auto'):
+        if self.mapdisplay and \
+                UserSettings.Get(group = 'atm', key = 'highlight', subkey = 'auto'):
             # TODO: replace by signals
             if showSelected:
                 self._drawSelected(zoom=False, selectedOnly=False) 

Modified: grass/trunk/gui/wxpython/dbmgr/manager.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/manager.py	2014-03-01 18:02:38 UTC (rev 59159)
+++ grass/trunk/gui/wxpython/dbmgr/manager.py	2014-03-02 12:02:46 UTC (rev 59160)
@@ -12,7 +12,7 @@
 List of classes:
  - manager::AttributeManager
 
-(C) 2007-2009, 2011-2012 by the GRASS Development Team
+(C) 2007-2014 by the GRASS Development Team
 
 This program is free software under the GNU General Public License
 (>=v2). Read the file COPYING that comes with GRASS for details.
@@ -124,7 +124,7 @@
 
         # events
         self.btnClose.Bind(wx.EVT_BUTTON,   self.OnCloseWindow)
-        self.btnReload.Bind(wx.EVT_BUTTON, self.ReloadData)
+        self.btnReload.Bind(wx.EVT_BUTTON, self.OnReloadData)
         self.notebook.Bind(FN.EVT_FLATNOTEBOOK_PAGE_CHANGED, self.OnPageChanged)
         self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
 
@@ -166,10 +166,10 @@
         
         event.Skip()
 
-    def ReloadData(self):
+    def OnReloadData(self, event):
         """Reload data"""
         if self.pages['browse']:
-            self.pages['browse'].OnDataReload() # TODO replace by signal
+            self.pages['browse'].OnDataReload(event) # TODO replace by signal
         
     def OnPageChanged(self, event):
         """!On page in ATM is changed"""



More information about the grass-commit mailing list