From 4c196f6baeae85084f75df320625257502dd871c Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Mon, 13 Apr 2020 20:44:51 +0300 Subject: [PATCH] - the Show Shell in Edit -> Preferences will now toggle the Tcl shell based on the current status of the Tcl Shell - updated the Tcl command Isolate help for follow parameter --- FlatCAMApp.py | 15 +++++++++++++++ README.md | 2 ++ flatcamGUI/PreferencesUI.py | 2 +- tclCommands/TclCommandIsolate.py | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 61769ce8..21aad659 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -5453,6 +5453,21 @@ class App(QtCore.QObject): else: self.ui.shell_dock.show() + def on_toggle_shell_from_settings(self, state): + """ + Toggle shell: if is visible close it, if it is closed then open it + :return: None + """ + + self.report_usage("on_toggle_shell_from_settings()") + + if state is True: + if not self.ui.shell_dock.isVisible(): + self.ui.shell_dock.show() + else: + if self.ui.shell_dock.isVisible(): + self.ui.shell_dock.hide() + def on_register_files(self, obj_type=None): """ Called whenever there is a need to register file extensions with FlatCAM. diff --git a/README.md b/README.md index fb03c75d..4996be13 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ CAD program, and create G-Code for Isolation routing. - updated the Tcl command PlotAll to be able to run threaded or not - updated the Tcl commands PlotAll and PlotObjects to have a parameter that control if the objects are to be plotted or not on canvas; it serve as a disable/enable - minor update to the autocomplete dictionary +- the Show Shell in Edit -> Preferences will now toggle the Tcl shell based on the current status of the Tcl Shell +- updated the Tcl command Isolate help for follow parameter 11.04.2020 diff --git a/flatcamGUI/PreferencesUI.py b/flatcamGUI/PreferencesUI.py index 239b6fbb..33661845 100644 --- a/flatcamGUI/PreferencesUI.py +++ b/flatcamGUI/PreferencesUI.py @@ -1736,7 +1736,7 @@ class GeneralAppPrefGroupUI(OptionsGroupUI): self.splash_cb.stateChanged.connect(self.on_splash_changed) # Monitor the checkbox from the Application Defaults Tab and show the TCL shell or not depending on it's value - self.shell_startup_cb.clicked.connect(self.app.on_toggle_shell) + self.shell_startup_cb.clicked.connect(self.app.on_toggle_shell_from_settings) self.language_apply_btn.clicked.connect(lambda: fcTranslate.on_language_apply_click(app=self.app, restart=True)) diff --git a/tclCommands/TclCommandIsolate.py b/tclCommands/TclCommandIsolate.py index 337280df..9fc4d214 100644 --- a/tclCommands/TclCommandIsolate.py +++ b/tclCommands/TclCommandIsolate.py @@ -52,7 +52,7 @@ class TclCommandIsolate(TclCommandSignaled): 'E.g: for a 25% from tool diameter overlap use -overlap 25'), ('combine', 'Combine all passes into one geometry. Can be True (1) or False (0)'), ('outname', 'Name of the resulting Geometry object.'), - ('follow', 'Create a Geometry that follows the Gerber path.'), + ('follow', 'Create a Geometry that follows the Gerber path. Can be True (1) or False (0).'), ('iso_type', 'A value of 0 will isolate exteriors, a value of 1 will isolate interiors ' 'and a value of 2 will do full isolation.') ]),