Przeglądaj źródła

- 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

Marius Stanciu 6 lat temu
rodzic
commit
4b28d980fd
2 zmienionych plików z 5 dodań i 1 usunięć
  1. 4 1
      FlatCAMApp.py
  2. 1 0
      README.md

+ 4 - 1
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:

+ 1 - 0
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