- fixed the merge methods for all FlatCAM objects

This commit is contained in:
Marius Stanciu
2020-04-29 11:10:43 +03:00
committed by Marius
parent 2ca6e2e3f1
commit b8d85d2be2
7 changed files with 25 additions and 49 deletions

View File

@@ -130,7 +130,8 @@ class ExcellonObject(FlatCAMObj, Excellon):
# from predecessors.
self.ser_attrs += ['options', 'kind']
def merge(self, exc_list, exc_final):
@staticmethod
def merge(exc_list, exc_final, decimals=None):
"""
Merge Excellon objects found in exc_list parameter into exc_final object.
Options are always copied from source .
@@ -146,10 +147,9 @@ class ExcellonObject(FlatCAMObj, Excellon):
:return: None
"""
try:
decimals_exc = self.decimals
except AttributeError:
decimals_exc = 4
if decimals is None:
decimals = 4
decimals_exc = decimals
# flag to signal that we need to reorder the tools dictionary and drills and slots lists
flag_order = False