Explorar el Código

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 hace 9 años
padre
commit
545cffe1cb
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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])
             win = self.FindWindowById(porf['wxId'][0])
             porf['value'] = win.GetDsn()
             porf['value'] = win.GetDsn()
             pLayer = self.task.get_param('layer', element = 'name', raiseError = False)
             pLayer = self.task.get_param('layer', element = 'name', raiseError = False)
-            pLayer['value'] = ''
+            if pLayer:
+                pLayer['value'] = ''
         else:
         else:
             if isinstance(me, wx.SpinCtrl):
             if isinstance(me, wx.SpinCtrl):
                 porf['value'] = str(me.GetValue())
                 porf['value'] = str(me.GetValue())