From 4b28d980fd31e6c411feb81dbec6ea0a5841a2c9 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Mon, 16 Sep 2019 04:10:02 +0300 Subject: [PATCH] - fixed the App.on_view_source() method for CNCJob objects: the Gcode will now contain the Prepend and Append code from the Edit -> Preferences -> CNCJob -> CNCJob Options --- FlatCAMApp.py | 5 ++++- README.md | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index f15284ac..d31f44ae 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -8240,7 +8240,10 @@ class App(QtCore.QObject): # then append the text from GCode to the text editor if obj.kind == 'cncjob': try: - file = obj.export_gcode(preamble='', postamble='', to_file=True) + file = obj.export_gcode( + preamble=self.defaults["cncjob_prepend"], + postamble=self.defaults["cncjob_append"], + to_file=True) if file == 'fail': return 'fail' except AttributeError: diff --git a/README.md b/README.md index cc7e8955..cce89d1f 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ CAD program, and create G-Code for Isolation routing. 16.09.2019 - modified the TclCommand New so it will no longer close all tabs when called (it closed the Code Editor tab which may have been holding the code that run) +- fixed the App.on_view_source() method for CNCJob objects: the Gcode will now contain the Prepend and Append code from the Edit -> Preferences -> CNCJob -> CNCJob Options 15.09.2019