diff --git a/boxes/generators/typetray.py b/boxes/generators/typetray.py index a61069f..83a2dfd 100644 --- a/boxes/generators/typetray.py +++ b/boxes/generators/typetray.py @@ -106,16 +106,6 @@ class TypeTray(_TopEdge): if b != "e": self.rectangularWall(x, y, "ffff", callback=[ self.xSlots, self.ySlots], move="up") - if self.closedtop: - if self.top_edge == "f": - e = "FFFF" - else: - e = "ffff" - if sameh: - self.rectangularWall(x, y, e, callback=[ - self.xSlots, self.ySlots], move="up") - else: - self.rectangularWall(x, y, e, move="up") # Inner walls @@ -130,6 +120,14 @@ class TypeTray(_TopEdge): self.rectangularWall(x, hi, e, move="up") + # top / lid + if self.closedtop and sameh: + e = "FFFF" if self.top_edge == "f" else "ffff" + self.rectangularWall(x, y, e, callback=[ + self.xSlots, self.ySlots], move="up") + else: + self.drawLid(x, y, self.top_edge) + self.ctx.restore() self.rectangularWall(x, hi, "ffff", move="right only")