瀏覽代碼

g.gui.iclass: fix reading maps from subgroup (patch by Anna Kratovilova)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54688 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 年之前
父節點
當前提交
617478582a
共有 1 個文件被更改,包括 6 次插入4 次删除
  1. 6 4
      gui/wxpython/iclass/frame.py

+ 6 - 4
gui/wxpython/iclass/frame.py

@@ -8,7 +8,7 @@ Classes:
  - frame::IClassMapFrame
  - frame::MapManager
 
-(C) 2006-2011 by the GRASS Development Team
+(C) 2006-2013 by the GRASS Development Team
 This program is free software under the GNU General Public
 License (>=v2). Read the file COPYING that comes with GRASS
 for details.
@@ -869,7 +869,9 @@ class IClassMapFrame(DoubleMapFrame):
         
         # init Ref struct with the files in group */
         I_free_group_ref(self.refer)
-        if (not I_iclass_init_group(self.group, self.refer)):
+        # we expect the subgroup name to be the same as the group name
+        subgroup = self.group
+        if (not I_iclass_init_group(self.group, subgroup, self.refer)):
             return False
         
         I_free_signatures(self.signatures)
@@ -1035,13 +1037,13 @@ class IClassMapFrame(DoubleMapFrame):
         return count
         
     def GetGroupLayers(self, group):
-        """! Get layers in group
+        """!Get layers in subgroup (expecting same name for group and subgroup)
     
         @todo consider moving this function to core module for convenient
         """
         res = RunCommand('i.group',
                          flags = 'g',
-                         group = group,
+                         group = group, subgroup = group,
                          read = True).strip()
         if res.split('\n')[0]:
             return res.split('\n')