瀏覽代碼

wxGUI/manager: fix 'refresh' when no tab available

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@49987 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 年之前
父節點
當前提交
a779bbf028
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      gui/wxpython/dbmgr/manager.py

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

@@ -1916,10 +1916,12 @@ class AttributeManager(wx.Frame):
         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()