Browse Source

wxGUI/forms: don't fail when pOpt is None

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58734 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 11 năm trước cách đây
mục cha
commit
be7a5617b7
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      gui/wxpython/gui_core/forms.py

+ 1 - 1
gui/wxpython/gui_core/forms.py

@@ -1653,7 +1653,7 @@ class CmdPanel(wx.Panel):
                 options = guidep.split(',')
                 options = guidep.split(',')
                 for opt in options:
                 for opt in options:
                     pOpt = self.task.get_param(opt, element = 'name', raiseError = False)
                     pOpt = self.task.get_param(opt, element = 'name', raiseError = False)
-                    if id:
+                    if pOpt and id:
                         if 'wxId-bind' not in p:
                         if 'wxId-bind' not in p:
                             p['wxId-bind'] = list()
                             p['wxId-bind'] = list()
                         p['wxId-bind'] +=  pOpt['wxId']
                         p['wxId-bind'] +=  pOpt['wxId']