- on Set Origin, Move to Origin and Move actions for Gerber and Excellon objects the source file will be also updated (the export functions will export an updated object)

This commit is contained in:
Marius Stanciu
2020-02-19 21:26:08 +02:00
committed by Marius
parent 6a24c8e204
commit 72ce53182d
3 changed files with 36 additions and 1 deletions

View File

@@ -188,6 +188,16 @@ class ToolMove(FlatCAMTool):
sel_obj.options['ymin'] = b
sel_obj.options['xmax'] = c
sel_obj.options['ymax'] = d
# update the source_file with the new positions
for sel_obj in obj_list:
out_name = sel_obj.options["name"]
if sel_obj.kind == 'gerber':
sel_obj.source_file = self.app.export_gerber(
obj_name=out_name, filename=None, local_use=sel_obj, use_thread=False)
elif sel_obj.kind == 'excellon':
sel_obj.source_file = self.app.export_excellon(
obj_name=out_name, filename=None, local_use=sel_obj, use_thread=False)
except Exception as e:
log.debug('[ERROR_NOTCL] %s --> %s' % ('ToolMove.on_left_click()', str(e)))
return "fail"