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

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Dec 30 11:54:35 EST 2011


Author: martinl
Date: 2011-12-30 08:54:35 -0800 (Fri, 30 Dec 2011)
New Revision: 49987

Modified:
   grass/trunk/gui/wxpython/dbmgr/manager.py
Log:
wxGUI/manager: fix 'refresh' when no tab available


Modified: grass/trunk/gui/wxpython/dbmgr/manager.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/manager.py	2011-12-30 16:50:11 UTC (rev 49986)
+++ grass/trunk/gui/wxpython/dbmgr/manager.py	2011-12-30 16:54:35 UTC (rev 49987)
@@ -1916,10 +1916,12 @@
         keyColumn = -1 # index of key column
         listWin = self.FindWindowById(self.layerPage[self.layer]['data'])
         sql = None
+        win = self.FindWindowById(self.layerPage[self.layer]['simple'])
+        if not win:
+            return
         
         wx.BeginBusyCursor()
-        
-        if self.FindWindowById(self.layerPage[self.layer]['simple']).GetValue():
+        if win.GetValue():
             # simple sql statement
             whereCol = self.FindWindowById(self.layerPage[self.layer]['whereColumn']).GetStringSelection()
             whereOpe = self.FindWindowById(self.layerPage[self.layer]['whereOperator']).GetStringSelection()



More information about the grass-commit mailing list