Skip to content

Commit

Permalink
GUI crash fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tomek-szczesny committed Nov 11, 2023
1 parent c9ff02d commit 9e258ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/dymoprint/dymo_print_engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ def print_label(
equal to 1 are burned.
"""

if detected_device == None:
detected_device = detect_device()

# Convert the image to the proper matrix for the dymo labeler object so that
# rows span the width of the label, and the first row corresponds to the left
# edge of the label.
Expand Down
2 changes: 1 addition & 1 deletion src/dymoprint/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def print_label(self):
try:
if self.label_bitmap is None:
raise RuntimeError("No label to print! Call update_label_render first.")
print_label(
print_label(None,
self.label_bitmap, self.margin.value(), self.tape_size.currentData()
)
except (RuntimeError, USBError) as err:
Expand Down

0 comments on commit 9e258ae

Please sign in to comment.