Procházet zdrojové kódy

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 před 13 roky
rodič
revize
a779bbf028
1 změnil soubory, kde provedl 4 přidání a 2 odebrání
  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()