diff options
author | jaseg <git@jaseg.de> | 2023-03-31 22:31:19 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2023-04-10 23:57:15 +0200 |
commit | 33a35f796d1efa5233adb3da7483b198f13cb375 (patch) | |
tree | 01b13bc686ee427adf9b83a6da91dff41506f0ed /gerbonara/rs274x.py | |
parent | 02954407703430dcefba0b165360d201fe8e205c (diff) | |
download | gerbonara-33a35f796d1efa5233adb3da7483b198f13cb375.tar.gz gerbonara-33a35f796d1efa5233adb3da7483b198f13cb375.tar.bz2 gerbonara-33a35f796d1efa5233adb3da7483b198f13cb375.zip |
Fix failing tests
Diffstat (limited to 'gerbonara/rs274x.py')
-rw-r--r-- | gerbonara/rs274x.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gerbonara/rs274x.py b/gerbonara/rs274x.py index 5ef93dd..6620f10 100644 --- a/gerbonara/rs274x.py +++ b/gerbonara/rs274x.py @@ -544,9 +544,11 @@ class GraphicsState: yield '%LPD*%' if polarity_dark else '%LPC*%' def set_aperture(self, aperture): - if self.aperture != aperture: + ap_id = self.aperture_map[id(aperture)] + old_ap_id = self.aperture_map.get(id(self.aperture), None) + if ap_id != old_ap_id: self.aperture = aperture - yield f'D{self.aperture_map[id(aperture)]}*' + yield f'D{ap_id}*' def set_current_point(self, point, unit=None): point_mm = MM(point[0], unit), MM(point[1], unit) |