diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 3a922ddc..54b6be65 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -3876,8 +3876,6 @@ class App(QtCore.QObject): dialog.exec_() def handleTextChanged(self): - self.report_usage("handleTextChanged()") - # enable = not self.ui.code_editor.document().isEmpty() # self.ui.buttonPrint.setEnabled(enable) # self.ui.buttonPreview.setEnabled(enable) @@ -5770,6 +5768,7 @@ class App(QtCore.QObject): # first clear previous text in text editor (if any) self.ui.code_editor.clear() + self.ui.code_editor.setReadOnly(False) self.toggle_codeeditor = True self.ui.code_editor.completer_enable = False @@ -5831,9 +5830,19 @@ class App(QtCore.QObject): flt = "FlatCAM Scripts (*.FlatScript);;All Files (*.*)" self.init_code_editor(name=_("Script Editor")) self.ui.code_editor.completer_enable = True + self.ui.code_editor.append(_( + "#\n" + "# CREATE A NEW FLATCAM TCL SCRIPT\n" + "# TCL Tutorial here: https://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html\n" + "#\n\n" + )) + self.ui.buttonOpen.clicked.connect(lambda: self.handleOpen(filt=flt)) self.ui.buttonSave.clicked.connect(lambda: self.handleSaveGCode(filt=flt)) + self.handleTextChanged() + self.ui.code_editor.show() + def on_fileopenscript(self): _filter_ = "TCL script (*.FlatScript);;TCL script (*.TCL);;TCL script (*.TXT);;All Files (*.*)" try: diff --git a/tclCommands/TclCommand.py b/tclCommands/TclCommand.py index dc261ace..5e69a2c4 100644 --- a/tclCommands/TclCommand.py +++ b/tclCommands/TclCommand.py @@ -314,7 +314,7 @@ class TclCommandSignaled(TclCommand): This class is child of TclCommand and is used for commands which create new objects - it handles all neccessary stuff about blocking and passing exeptions + it handles all necessary stuff about blocking and passing exceptions """ @abc.abstractmethod