fix: the proof crops the finest stroke and closes the contact wait (0.1)
The browser records where the thinnest stroke sits in the assembled film; the proof takes a 15 cm window around it instead of always the top. A free proof no longer fails the layout's billed-metres check, and answering the proof card clears "Aguardando contato" and ends its timer.
This commit is contained in:
@@ -380,13 +380,14 @@ def open_source(path, name):
|
||||
return SourceImage(path, name)
|
||||
|
||||
|
||||
def check_layout(item, sizes, vector=()):
|
||||
def check_layout(item, sizes, vector=(), proof=False):
|
||||
"""Refuse a layout the file cannot reproduce faithfully. Returns the lowest
|
||||
DPI of the raster sources (vector pages have none)."""
|
||||
DPI of the raster sources (vector pages have none). A proof is free of
|
||||
charge, so its zero billed metres must not reject the item's full sheet."""
|
||||
production = item['production']
|
||||
height = Decimal(str(production['height_cm']))
|
||||
billed = Decimal(str(item['billed_metres'])) * 100
|
||||
if height > billed + HEIGHT_TOLERANCE_CM:
|
||||
if not proof and height > billed + HEIGHT_TOLERANCE_CM:
|
||||
raise Unsupported(f'a montagem tem {height} cm, mas só {billed} cm foram cobrados')
|
||||
lowest = None
|
||||
for placement in production['placements']:
|
||||
|
||||
Reference in New Issue
Block a user