PhoneHolder: Fix edge of second side being reversed
The code switched sides for each edges draen reversed. Change that to only reverse local variables and leave the edge objects unchanged. Thanks to https://github.com/ChrisLaserman for reporting! Resolves: #324
This commit is contained in:
parent
83f711b07a
commit
22a50a6181
|
@ -248,12 +248,13 @@ class SideEdge(edges.BaseEdge):
|
||||||
self.reverse = reverse
|
self.reverse = reverse
|
||||||
|
|
||||||
def __call__(self, length, **kw):
|
def __call__(self, length, **kw):
|
||||||
|
tab_start = self.tab_start
|
||||||
tab_end = length - self.tab_start - self.tab_length
|
tab_end = length - self.tab_start - self.tab_length
|
||||||
|
|
||||||
if self.reverse:
|
if self.reverse:
|
||||||
self.tab_start, tab_end = tab_end, self.tab_start
|
tab_start, tab_end = tab_end, tab_start
|
||||||
|
|
||||||
self.edges["F"](self.tab_start)
|
self.edges["F"](tab_start)
|
||||||
self.polyline(
|
self.polyline(
|
||||||
0,
|
0,
|
||||||
90,
|
90,
|
||||||
|
@ -277,12 +278,13 @@ class TabbedEdge(edges.BaseEdge):
|
||||||
self.reverse = reverse
|
self.reverse = reverse
|
||||||
|
|
||||||
def __call__(self, length, **kw):
|
def __call__(self, length, **kw):
|
||||||
|
tab_start = self.tab_start
|
||||||
tab_end = length - self.tab_start - self.tab_length
|
tab_end = length - self.tab_start - self.tab_length
|
||||||
|
|
||||||
if self.reverse:
|
if self.reverse:
|
||||||
self.tab_start, tab_end = tab_end, self.tab_start
|
tab_start, tab_end = tab_end, tab_start
|
||||||
|
|
||||||
self.edges["f"](self.tab_start)
|
self.edges["f"](tab_start)
|
||||||
|
|
||||||
self.ctx.save()
|
self.ctx.save()
|
||||||
self.fingerHolesAt(0, -self.thickness / 2, self.tab_length, 0)
|
self.fingerHolesAt(0, -self.thickness / 2, self.tab_length, 0)
|
||||||
|
|
Loading…
Reference in New Issue