From eee6b931c76602e492dafa5269b11d8707ba89aa Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sat, 30 May 2020 21:28:39 +0300 Subject: [PATCH] - made the Shell Dock always show docked --- AppGUI/GUIElements.py | 5 +++++ AppTools/ToolShell.py | 24 ++++++++++++------------ CHANGELOG.md | 1 + 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/AppGUI/GUIElements.py b/AppGUI/GUIElements.py index 5b4f2ec6..a7829719 100644 --- a/AppGUI/GUIElements.py +++ b/AppGUI/GUIElements.py @@ -2986,6 +2986,11 @@ class FCDock(QtWidgets.QDockWidget): self.close_callback() super().closeEvent(event) + def show(self) -> None: + if self.isFloating(): + self.setFloating(False) + super().show() + class FlatCAMActivityView(QtWidgets.QWidget): """ diff --git a/AppTools/ToolShell.py b/AppTools/ToolShell.py index 4366dfd5..246ffd24 100644 --- a/AppTools/ToolShell.py +++ b/AppTools/ToolShell.py @@ -267,6 +267,7 @@ class FCShell(TermWidget): self.app = app self.tcl_commands_storage = {} + self.tcl = None self.init_tcl() @@ -345,11 +346,11 @@ class FCShell(TermWidget): def is_command_complete(self, text): - def skipQuotes(txt): - quote = txt[0] - text_val = txt[1:] - endIndex = str(text_val).index(quote) - return text[endIndex:] + # def skipQuotes(txt): + # quote = txt[0] + # text_val = txt[1:] + # endIndex = str(text_val).index(quote) + # return text[endIndex:] # I'm disabling this because I need to be able to load paths that have spaces by # enclosing them in quotes --- Marius Stanciu @@ -371,10 +372,10 @@ class FCShell(TermWidget): Handles input from the shell. See FlatCAMApp.setup_shell for shell commands. Also handles execution in separated threads - :param text: FlatCAM TclCommand with parameters - :param no_echo: If True it will not try to print to the Shell because most likely the shell is hidden and it - will create crashes of the _Expandable_Edit widget - :return: output if there was any + :param text: FlatCAM TclCommand with parameters + :param no_echo: If True it will not try to print to the Shell because most likely the shell is hidden and it + will create crashes of the _Expandable_Edit widget + :return: output if there was any """ self.app.defaults.report_usage('exec_command') @@ -404,12 +405,11 @@ class FCShell(TermWidget): self.append_output(result + '\n') except tk.TclError as e: - # This will display more precise answer if something in TCL shell fails result = self.tcl.eval("set errorInfo") - self.app.log.error("Exec command Exception: %s" % (result + '\n')) + self.app.log.error("Exception on Tcl Command execution: %s" % (result + '\n')) if no_echo is False: - self.append_error('ERROR: ' + result + '\n') + self.append_error('ERROR Report: ' + result + '\n') # Show error in console and just return or in test raise exception if reraise: raise e diff --git a/CHANGELOG.md b/CHANGELOG.md index a4d558a6..232ae0bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ CHANGELOG for FlatCAM beta - optimized the Gerber UI - added a Multi-color checkbox for the Geometry UI (will color differently tool geometry when the geometry is multitool) - added a Multi-color checkbox for the Excellon UI (this way colors for each tool are easier to differentiate especially when the diameter is close) +- made the Shell Dock always show docked 29.05.2020