Skip to content

Commit

Permalink
Also read labels from print layout templates
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Jan 18, 2024
1 parent 75db5e4 commit 5292ae6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/config_generator/config_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,13 @@ def search_print_layouts(self, generator_config):
print_map['height'] = float(size[1])
print_template['map'] = print_map

labels = []
for label in doc.findall(".//LayoutItem[@type='65641']"):
if label.get('visibility') == '1':
labels.append(label.get('id'))
if labels:
print_template['labels'] = labels

self.logger.info("Found print template " + filename + " (" + layout.get('name') + ")")
print_layouts[print_template['name']] = print_template
if print_template['name'].endswith("_legend"):
Expand Down

0 comments on commit 5292ae6

Please sign in to comment.