File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,13 @@ def __visibility_presets(self, root):
247247 layerMap [layerId .text ] = mapLayer .find ('shortname' ).text
248248 elif mapLayer .find ('layername' ) is not None :
249249 layerMap [layerId .text ] = mapLayer .find ('layername' ).text
250+ for group in root .findall ('.//layer-tree-group' ):
251+ if group .get ('name' ):
252+ shortname = group .find ('./shortname' )
253+ if shortname is not None :
254+ layerMap [group .get ('name' )] = shortname .text
255+ else :
256+ layerMap [group .get ('name' )] = group .get ('name' )
250257
251258 result = {}
252259 for visibilityPreset in visibilityPresets .findall ('./visibility-preset' ):
@@ -259,7 +266,7 @@ def __visibility_presets(self, root):
259266 for checkedGroupNode in visibilityPreset .findall ('./checked-group-nodes/checked-group-node' ):
260267 groupid = checkedGroupNode .get ('id' )
261268 if groupid is not None :
262- result [name ][groupid ] = ""
269+ result [name ][layerMap [ groupid ] ] = ""
263270
264271 return result
265272
You can’t perform that action at this time.
0 commit comments