- added some icons in the Code Editor
- replaced some icons in the app - in Code Editor, when changing text, the Save Code button will change color (text and icon) to red and after save it will revert the color to the default one - in Code Editor some methods rework
This commit is contained in:
@@ -1072,10 +1072,6 @@ class ToolCalibration(AppTool):
|
||||
self.app.ui.position_label.setText("")
|
||||
self.app.ui.rel_position_label.setText("")
|
||||
|
||||
# first clear previous text in text editor (if any)
|
||||
self.gcode_editor_tab.code_editor.clear()
|
||||
self.gcode_editor_tab.code_editor.setReadOnly(False)
|
||||
|
||||
self.gcode_editor_tab.code_editor.completer_enable = False
|
||||
self.gcode_editor_tab.buttonRun.hide()
|
||||
|
||||
@@ -1085,13 +1081,11 @@ class ToolCalibration(AppTool):
|
||||
self.gcode_editor_tab.t_frame.hide()
|
||||
# then append the text from GCode to the text editor
|
||||
try:
|
||||
self.gcode_editor_tab.code_editor.setPlainText(gcode)
|
||||
self.gcode_editor_tab.load_text(gcode, move_to_start=True, clear_text=True)
|
||||
except Exception as e:
|
||||
self.app.inform.emit('[ERROR] %s %s' % ('ERROR -->', str(e)))
|
||||
return
|
||||
|
||||
self.gcode_editor_tab.code_editor.moveCursor(QtGui.QTextCursor.Start)
|
||||
|
||||
self.gcode_editor_tab.t_frame.show()
|
||||
self.app.proc_container.view.set_idle()
|
||||
|
||||
|
||||
@@ -3269,7 +3269,8 @@ class IsoUI:
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
self.grid3.addWidget(separator_line, 39, 0, 1, 2)
|
||||
|
||||
self.generate_iso_button = QtWidgets.QPushButton("%s" % _("Generate Isolation Geometry"))
|
||||
self.generate_iso_button = QtWidgets.QPushButton("%s" % _("Generate Geometry"))
|
||||
self.generate_iso_button.setIcon(QtGui.QIcon(self.app.resource_location + '/geometry32.png'))
|
||||
self.generate_iso_button.setStyleSheet("""
|
||||
QPushButton
|
||||
{
|
||||
|
||||
@@ -4214,6 +4214,7 @@ class NccUI:
|
||||
self.grid3.addWidget(separator_line, 32, 0, 1, 2)
|
||||
|
||||
self.generate_ncc_button = QtWidgets.QPushButton(_('Generate Geometry'))
|
||||
self.generate_ncc_button.setIcon(QtGui.QIcon(self.app.resource_location + '/geometry32.png'))
|
||||
self.generate_ncc_button.setToolTip(
|
||||
_("Create the Geometry Object\n"
|
||||
"for non-copper routing.")
|
||||
|
||||
@@ -3241,6 +3241,7 @@ class PaintUI:
|
||||
|
||||
# GO Button
|
||||
self.generate_paint_button = QtWidgets.QPushButton(_('Generate Geometry'))
|
||||
self.generate_paint_button.setIcon(QtGui.QIcon(self.app.resource_location + '/geometry32.png'))
|
||||
self.generate_paint_button.setToolTip(
|
||||
_("Create a Geometry Object which paints the polygons.")
|
||||
)
|
||||
|
||||
@@ -1019,19 +1019,15 @@ class SolderPaste(AppTool):
|
||||
return
|
||||
|
||||
try:
|
||||
for line in lines:
|
||||
proc_line = str(line).strip('\n')
|
||||
self.text_editor_tab.code_editor.append(proc_line)
|
||||
# for line in lines:
|
||||
# proc_line = str(line).strip('\n')
|
||||
# self.text_editor_tab.code_editor.append(proc_line)
|
||||
self.text_editor_tab.load_text(lines, move_to_start=True)
|
||||
except Exception as e:
|
||||
log.debug('ToolSolderPaste.on_view_gcode() -->%s' % str(e))
|
||||
self.app.inform.emit('[ERROR] %s --> %s' % ('ToolSolderPaste.on_view_gcode()', str(e)))
|
||||
return
|
||||
|
||||
self.text_editor_tab.code_editor.moveCursor(QtGui.QTextCursor.Start)
|
||||
|
||||
self.text_editor_tab.handleTextChanged()
|
||||
# self.app.ui.show()
|
||||
|
||||
def on_save_gcode(self):
|
||||
"""
|
||||
Save solderpaste dispensing GCode to a file on HDD.
|
||||
|
||||
Reference in New Issue
Block a user