- finished improving the show of text files in FlatCAM (CNC Code, Source files)
This commit is contained in:
parent
63e22cf3ee
commit
eafa6350b7
|
@ -9584,7 +9584,7 @@ class App(QtCore.QObject):
|
||||||
elif obj.kind == 'cncjob':
|
elif obj.kind == 'cncjob':
|
||||||
"GCode Files (*.NC);;All Files (*.*)"
|
"GCode Files (*.NC);;All Files (*.*)"
|
||||||
|
|
||||||
self.source_editor_tab = TextEditor(app=self)
|
self.source_editor_tab = TextEditor(app=self, plain_text=True)
|
||||||
|
|
||||||
# add the tab if it was closed
|
# add the tab if it was closed
|
||||||
self.ui.plot_tab_area.addTab(self.source_editor_tab, '%s' % _("Source Editor"))
|
self.ui.plot_tab_area.addTab(self.source_editor_tab, '%s' % _("Source Editor"))
|
||||||
|
@ -9639,10 +9639,11 @@ class App(QtCore.QObject):
|
||||||
|
|
||||||
self.source_editor_tab.t_frame.hide()
|
self.source_editor_tab.t_frame.hide()
|
||||||
try:
|
try:
|
||||||
for line in file:
|
self.source_editor_tab.code_editor.setPlainText(file.getvalue())
|
||||||
QtWidgets.QApplication.processEvents()
|
# for line in file:
|
||||||
proc_line = str(line).strip('\n')
|
# QtWidgets.QApplication.processEvents()
|
||||||
self.source_editor_tab.code_editor.append(proc_line)
|
# proc_line = str(line).strip('\n')
|
||||||
|
# self.source_editor_tab.code_editor.append(proc_line)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.debug('App.on_view_source() -->%s' % str(e))
|
log.debug('App.on_view_source() -->%s' % str(e))
|
||||||
self.inform.emit('[ERROR] %s: %s' % (_('Failed to load the source code for the selected object'), str(e)))
|
self.inform.emit('[ERROR] %s: %s' % (_('Failed to load the source code for the selected object'), str(e)))
|
||||||
|
|
|
@ -6122,11 +6122,12 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
|
||||||
self.gcode_editor_tab.t_frame.hide()
|
self.gcode_editor_tab.t_frame.hide()
|
||||||
# then append the text from GCode to the text editor
|
# then append the text from GCode to the text editor
|
||||||
try:
|
try:
|
||||||
for line in self.app.gcode_edited:
|
self.gcode_editor_tab.code_editor.setPlainText(self.app.gcode_edited.getvalue())
|
||||||
QtWidgets.QApplication.processEvents()
|
# for line in self.app.gcode_edited:
|
||||||
|
# QtWidgets.QApplication.processEvents()
|
||||||
proc_line = str(line).strip('\n')
|
#
|
||||||
self.gcode_editor_tab.code_editor.append(proc_line)
|
# proc_line = str(line).strip('\n')
|
||||||
|
# self.gcode_editor_tab.code_editor.append(proc_line)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.debug('FlatCAMCNNJob.on_edit_code_click() -->%s' % str(e))
|
log.debug('FlatCAMCNNJob.on_edit_code_click() -->%s' % str(e))
|
||||||
self.app.inform.emit('[ERROR] %s %s' % ('FlatCAMCNNJob.on_edit_code_click() -->', str(e)))
|
self.app.inform.emit('[ERROR] %s %s' % ('FlatCAMCNNJob.on_edit_code_click() -->', str(e)))
|
||||||
|
|
|
@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
|
||||||
|
|
||||||
- trying to improve the performance of View CNC Code command by using QPlainTextEdit; made the mods for it
|
- trying to improve the performance of View CNC Code command by using QPlainTextEdit; made the mods for it
|
||||||
- when using the Find function in the TextEditor and the result reach the bottom of the document, the next find will be the first in the document (before it defaulted to the beginning of the document)
|
- when using the Find function in the TextEditor and the result reach the bottom of the document, the next find will be the first in the document (before it defaulted to the beginning of the document)
|
||||||
|
- finished improving the show of text files in FlatCAM (CNC Code, Source files)
|
||||||
|
|
||||||
12.11.2019
|
12.11.2019
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue