- added possibility to see the GCode when right clicking on the Project tab on a CNCJob object and then clicking View Source

This commit is contained in:
Marius Stanciu
2019-09-15 22:46:51 +03:00
committed by Marius
parent b0d545eb03
commit c06317374e
4 changed files with 27 additions and 11 deletions

View File

@@ -5842,11 +5842,12 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
preamble = str(self.ui.prepend_text.get_value())
postamble = str(self.ui.append_text.get_value())
gc = self.export_gcode(preamble=preamble, postamble=postamble, to_file=True)
if gc == 'fail':
gco = self.export_gcode(preamble=preamble, postamble=postamble, to_file=True)
if gco == 'fail':
return
else:
self.app.gcode_edited = gc
self.app.gcode_edited = gco
self.app.init_code_editor(name=_("Code Editor"))
self.app.ui.buttonOpen.clicked.connect(self.app.handleOpen)