From 72617110cfc2a8b40e2a0c7cd77029443a4ea098 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Sun, 24 Feb 2019 12:19:57 +0100 Subject: [PATCH] FingerHoleEdge: Use modern code and add tab support --- boxes/edges.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/boxes/edges.py b/boxes/edges.py index 06368f9..a5a1a31 100644 --- a/boxes/edges.py +++ b/boxes/edges.py @@ -714,14 +714,11 @@ class FingerHoleEdge(BaseEdge): def __call__(self, length, bedBolts=None, bedBoltSettings=None, **kw): dist = self.fingerHoles.settings.edge_width - self.ctx.save() - self.fingerHoles(0, dist + self.settings.thickness / 2, length, 0, - bedBolts=bedBolts, bedBoltSettings=bedBoltSettings) - self.ctx.restore() - # XXX continue path - self.ctx.move_to(0, 0) - self.ctx.line_to(length, 0) - self.ctx.translate(*self.ctx.get_current_point()) + with self.saved_context(): + self.fingerHoles( + 0, dist + self.settings.thickness / 2, length, 0, + bedBolts=bedBolts, bedBoltSettings=bedBoltSettings) + self.edge(length, tabs=2) def startwidth(self): """ """