Do not ignore the name requested by the caller.

This commit is contained in:
Adam Coddington 2021-02-23 13:44:05 -08:00
parent 19561cb936
commit bd40265bf4
1 changed files with 3 additions and 3 deletions

View File

@ -964,7 +964,7 @@ class ExcellonObject(FlatCAMObj, Excellon):
tools = self.get_selected_tools_list() tools = self.get_selected_tools_list()
if outname is None: if outname is None:
outname = self.options["name"] + "_mill" outname = self.options["name"] + "_slot"
if tooldia is None: if tooldia is None:
tooldia = float(self.options["slot_tooldia"]) tooldia = float(self.options["slot_tooldia"])
@ -1038,7 +1038,7 @@ class ExcellonObject(FlatCAMObj, Excellon):
if use_thread: if use_thread:
def geo_thread(a_obj): def geo_thread(a_obj):
a_obj.app_obj.new_object("geometry", outname + '_slot', geo_init, plot=plot) a_obj.app_obj.new_object("geometry", outname, geo_init, plot=plot)
# Create a promise with the new name # Create a promise with the new name
self.app.collection.promise(outname) self.app.collection.promise(outname)
@ -1046,7 +1046,7 @@ class ExcellonObject(FlatCAMObj, Excellon):
# Send to worker # Send to worker
self.app.worker_task.emit({'fcn': geo_thread, 'params': [self.app]}) self.app.worker_task.emit({'fcn': geo_thread, 'params': [self.app]})
else: else:
self.app.app_obj.new_object("geometry", outname + '_slot', geo_init, plot=plot) self.app.app_obj.new_object("geometry", outname, geo_init, plot=plot)
return True, "" return True, ""