瀏覽代碼

wxGUI/forms: fix gdalselect when no layer option is defined

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

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

@@ -2262,7 +2262,8 @@ class CmdPanel(wx.Panel):
             win = self.FindWindowById(porf['wxId'][0])
             porf['value'] = win.GetDsn()
             pLayer = self.task.get_param('layer', element = 'name', raiseError = False)
-            pLayer['value'] = ''
+            if pLayer:
+                pLayer['value'] = ''
         else:
             if isinstance(me, wx.SpinCtrl):
                 porf['value'] = str(me.GetValue())