- fixed an if/else selection in the AppObject.on_object_created() that made the plotting of CNCJob objects to be done twice and second time will disregard the Plot Kind Preference value

This commit is contained in:
Marius Stanciu
2020-11-07 14:37:49 +02:00
committed by Marius
parent 93555a134e
commit cccc5634c9
5 changed files with 8 additions and 7 deletions

View File

@@ -452,7 +452,7 @@ class AppObject(QtCore.QObject):
with self.app.proc_container.new('%s ...' % _("Plotting")):
if t_obj.kind == 'cncjob':
t_obj.plot(kind=self.app.defaults["cncjob_plot_kind"])
if t_obj.kind == 'gerber':
elif t_obj.kind == 'gerber':
t_obj.plot(color=t_obj.outline_color, face_color=t_obj.fill_color)
else:
t_obj.plot()

View File

@@ -2489,7 +2489,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
if self.origin_kind == "excellon":
if self.exc_cnc_tools:
for tooldia_key in self.exc_cnc_tools:
tooldia = float('%.*f' % (self.decimals, float(tooldia_key)))
tooldia = self.app.dec_format(float(tooldia_key), self.decimals)
gcode_parsed = self.exc_cnc_tools[tooldia_key]['gcode_parsed']
if not gcode_parsed:
continue
@@ -2499,7 +2499,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
# multiple tools usage
if self.cnc_tools:
for tooluid_key in self.cnc_tools:
tooldia = float('%.*f' % (self.decimals, float(self.cnc_tools[tooluid_key]['tooldia'])))
tooldia = self.app.dec_format(float(self.cnc_tools[tooluid_key]['tooldia']), self.decimals)
gcode_parsed = self.cnc_tools[tooluid_key]['gcode_parsed']
self.plot2(tooldia=tooldia, obj=self, visible=visible, gcode_parsed=gcode_parsed, kind=kind)