Fix for exception while merging excellons if there is no slots in second one

This commit is contained in:
Dmitriy Klabukov 2020-12-22 19:13:26 +00:00
parent a8a2f6b0e9
commit 4abeb7e539
1 changed files with 2 additions and 1 deletions

View File

@ -1313,7 +1313,8 @@ class ExcellonObject(FlatCAMObj, Excellon):
break
if t:
fused_tools_dict[t]['drills'] += tool_dict['drills']
fused_tools_dict[t]['slots'] += tool_dict['slots']
if 'slots' in tool_dict and tool_dict['slots']:
fused_tools_dict[t]['slots'] += tool_dict['slots']
fused_tools_dict[t]['solid_geometry'] += tool_dict['solid_geometry']
else:
fused_tools_dict[toolid] = tool_dict