- changed some status bar messages

- New feature: added the capability to view the source code of the Gerber/Excellon file that was loaded into the app. The file is also stored as an object attribute for later use. THe view option is in the project context menu and in Menu -> Options -> View Source
This commit is contained in:
Marius Stanciu
2019-02-16 19:47:50 +02:00
committed by Marius S
parent a7398961c7
commit 326599e4a3
10 changed files with 98 additions and 26 deletions

View File

@@ -422,6 +422,9 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
self.apertures_row = 0
# store the source file here
self.source_file = ""
# assert isinstance(self.ui, GerberObjectUI)
# self.ui.plot_cb.stateChanged.connect(self.on_plot_cb_click)
# self.ui.solid_cb.stateChanged.connect(self.on_solid_cb_click)
@@ -1092,6 +1095,9 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
# variable to store the distance travelled
self.travel_distance = 0.0
# store the source file here
self.source_file = ""
self.multigeo = False
@staticmethod
@@ -4809,7 +4815,7 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
def on_modifygcode_button_click(self, *args):
# add the tab if it was closed
self.app.ui.plot_tab_area.addTab(self.app.ui.cncjob_tab, "CNC Code Editor")
self.app.ui.plot_tab_area.addTab(self.app.ui.cncjob_tab, "Code Editor")
# delete the absolute and relative position and messages in the infobar
self.app.ui.position_label.setText("")
@@ -4821,7 +4827,7 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
preamble = str(self.ui.prepend_text.get_value())
postamble = str(self.ui.append_text.get_value())
self.app.gcode_edited = self.export_gcode(preamble=preamble, postamble=postamble, to_file=True)
# print(self.app.gcode_edited)
# first clear previous text in text editor (if any)
self.app.ui.code_editor.clear()