[GRASS-SVN] r73119 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 17 09:05:51 PDT 2018


Author: martinl
Date: 2018-08-17 09:05:51 -0700 (Fri, 17 Aug 2018)
New Revision: 73119

Modified:
   grass/trunk/gui/wxpython/gui_core/forms.py
Log:
wxGUI forms: improve gui dependencies logic, see #3619

Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py	2018-08-17 16:05:07 UTC (rev 73118)
+++ grass/trunk/gui/wxpython/gui_core/forms.py	2018-08-17 16:05:51 UTC (rev 73119)
@@ -272,7 +272,11 @@
                     pMapL = self.task.get_param(
                         p['wxId'][0], element='wxId-bind', raiseError=False)
                     if pMapL:
-                        map = pMapL.get('value', '')
+                        gui_deps = pMapL.get('guidependency', None)
+                        if gui_deps:
+                            gui_deps = gui_deps.split(',')
+                        if not gui_deps or (gui_deps and p.get('name', '') in gui_deps):
+                            map = pMapL.get('value', '')
 
             if name == 'TableSelect' or \
                     (name == 'ColumnSelect' and not map):
@@ -294,12 +298,13 @@
                 # determine format
                 native = True
 
-                for id in pMap['wxId']:
-                    winVec = self.parent.FindWindowById(id)
-                    if winVec.GetName() == 'VectorFormat' and \
-                            winVec.GetSelection() != 0:
-                        native = False
-                        break
+                if pMap:
+                    for id in pMap['wxId']:
+                        winVec = self.parent.FindWindowById(id)
+                        if winVec.GetName() == 'VectorFormat' and \
+                                winVec.GetSelection() != 0:
+                            native = False
+                            break
                 # TODO: update only if needed
                 if native:
                     if map:



More information about the grass-commit mailing list