Skip to content

Commit

Permalink
Only set the PDF title once
Browse files Browse the repository at this point in the history
  • Loading branch information
Finomnis committed Feb 25, 2023
1 parent 1645b7e commit 9b94093
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions LabelGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,6 @@ def draw_resistor_sticker(


def begin_page(c: Canvas, layout: PaperConfig, draw_outlines: bool) -> None:
# Set the title
c.setTitle(f"Resistor Labels - {layout.paper_name}")

# Draw the outlines of the stickers. Not recommended for the actual print.
if draw_outlines:
render_outlines(c, layout)
Expand All @@ -564,6 +561,9 @@ def flatten(elem: Union[Optional[float], List[Optional[float]]]) -> List[Optiona
# Flatten
values_flat: List[Optional[float]] = [elem for nested in values for elem in flatten(nested)]

# Set the title
c.setTitle(f"Resistor Labels - {layout.paper_name}")

# Begin the first page
begin_page(c, layout, draw_outlines)

Expand Down

0 comments on commit 9b94093

Please sign in to comment.