- Tools Database - remade the UI

- made sure that the serializable attributes are added correctly and only once (self.ser_attrs)
This commit is contained in:
Marius Stanciu
2020-07-14 16:46:01 +03:00
committed by Marius
parent 5badd7a26b
commit 5748eb049b
8 changed files with 372 additions and 347 deletions

View File

@@ -118,7 +118,7 @@ class Excellon(Geometry):
# Attributes to be included in serialization
# Always append to it because it carries contents
# from Geometry.
self.ser_attrs += ['tools', 'zeros', 'excellon_format_upper_mm', 'excellon_format_lower_mm',
self.ser_attrs += ['zeros', 'excellon_format_upper_mm', 'excellon_format_lower_mm',
'excellon_format_upper_in', 'excellon_format_lower_in', 'excellon_units', 'source_file']
# ### Patterns ####

View File

@@ -142,12 +142,6 @@ class Gerber(Geometry):
self.source_file = ''
# Attributes to be included in serialization
# Always append to it because it carries contents
# from Geometry.
self.ser_attrs += ['int_digits', 'frac_digits', 'apertures',
'aperture_macros', 'solid_geometry', 'source_file']
# ### Parser patterns ## ##
# FS - Format Specification
# The format of X and Y must be the same!
@@ -234,6 +228,11 @@ class Gerber(Geometry):
self.use_buffer_for_union = self.app.defaults["gerber_use_buffer_for_union"]
# Attributes to be included in serialization
# Always append to it because it carries contents
# from Geometry.
self.ser_attrs += ['apertures', 'int_digits', 'frac_digits', 'aperture_macros', 'solid_geometry', 'source_file']
def aperture_parse(self, apertureId, apertureType, apParameters):
"""
Parse gerber aperture definition into dictionary of apertures.