Browse Source

wxGUI/dbmgr: fix OnReload

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59160 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 11 years ago
parent
commit
7922c97fd6
2 changed files with 6 additions and 5 deletions
  1. 2 1
      gui/wxpython/dbmgr/base.py
  2. 4 4
      gui/wxpython/dbmgr/manager.py

+ 2 - 1
gui/wxpython/dbmgr/base.py

@@ -1850,7 +1850,8 @@ class DbMgrBrowsePage(DbMgrNotebookBase):
                            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) 

+ 4 - 4
gui/wxpython/dbmgr/manager.py

@@ -12,7 +12,7 @@ http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/426407
 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 @@ class AttributeManager(wx.Frame, DbMgrBase):
 
         # 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 @@ class AttributeManager(wx.Frame, DbMgrBase):
         
         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"""