فهرست منبع

wxGUI: bugfix https://trac.osgeo.org/grass/ticket/950

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@41120 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 15 سال پیش
والد
کامیت
fdbda721d0
1فایلهای تغییر یافته به همراه7 افزوده شده و 5 حذف شده
  1. 7 5
      gui/wxpython/gui_modules/workspace.py

+ 7 - 5
gui/wxpython/gui_modules/workspace.py

@@ -155,12 +155,11 @@ class ProcessWorkspaceFile:
             # process all layers/groups in the display
             self.__processLayers(display)
 
-    def __processLayers(self, node):
+    def __processLayers(self, node, inGroup = False):
         """!Process layers/groups of selected display
-
-        @todo Fix group flag
         
         @param node display tree node
+        @param inGroup True when group is defined
         """
         for item in node.getchildren():
             if item.tag == 'group':
@@ -171,10 +170,13 @@ class ProcessWorkspaceFile:
                         "checked" : bool(int(item.get('checked', "0"))),
                         "opacity" : None,
                         "cmd"     : None,
-                        "group"   : False, #### self.inTag['group'], # ???
+                        "group"   : inGroup,
                         "display" : self.displayIndex,
+                        "vdigit"  : None,
                         "nviz"    : None})
                 
+                self.__processLayers(item, inGroup = True) # process items in group
+                
             elif item.tag == 'layer':
                 cmd, selected, vdigit, nviz = self.__processLayer(item)
                 
@@ -184,7 +186,7 @@ class ProcessWorkspaceFile:
                         "checked"  : bool(int(item.get('checked', "0"))),
                         "opacity"  : float(item.get('opacity', '1.0')),
                         "cmd"      : cmd,
-                        "group"    : False, #### self.inTag['group'], # ???
+                        "group"    : inGroup,
                         "display"  : self.displayIndex,
                         "selected" : selected,
                         "vdigit"   : vdigit,