- made the Shell Dock always show docked

This commit is contained in:
Marius Stanciu 2020-05-30 21:28:39 +03:00 committed by Marius
parent f74379de3e
commit eee6b931c7
3 changed files with 18 additions and 12 deletions

View File

@ -2986,6 +2986,11 @@ class FCDock(QtWidgets.QDockWidget):
self.close_callback() self.close_callback()
super().closeEvent(event) super().closeEvent(event)
def show(self) -> None:
if self.isFloating():
self.setFloating(False)
super().show()
class FlatCAMActivityView(QtWidgets.QWidget): class FlatCAMActivityView(QtWidgets.QWidget):
""" """

View File

@ -267,6 +267,7 @@ class FCShell(TermWidget):
self.app = app self.app = app
self.tcl_commands_storage = {} self.tcl_commands_storage = {}
self.tcl = None
self.init_tcl() self.init_tcl()
@ -345,11 +346,11 @@ class FCShell(TermWidget):
def is_command_complete(self, text): def is_command_complete(self, text):
def skipQuotes(txt): # def skipQuotes(txt):
quote = txt[0] # quote = txt[0]
text_val = txt[1:] # text_val = txt[1:]
endIndex = str(text_val).index(quote) # endIndex = str(text_val).index(quote)
return text[endIndex:] # return text[endIndex:]
# I'm disabling this because I need to be able to load paths that have spaces by # I'm disabling this because I need to be able to load paths that have spaces by
# enclosing them in quotes --- Marius Stanciu # 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. Handles input from the shell. See FlatCAMApp.setup_shell for shell commands.
Also handles execution in separated threads Also handles execution in separated threads
:param text: FlatCAM TclCommand with parameters :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 :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 will create crashes of the _Expandable_Edit widget
:return: output if there was any :return: output if there was any
""" """
self.app.defaults.report_usage('exec_command') self.app.defaults.report_usage('exec_command')
@ -404,12 +405,11 @@ class FCShell(TermWidget):
self.append_output(result + '\n') self.append_output(result + '\n')
except tk.TclError as e: except tk.TclError as e:
# This will display more precise answer if something in TCL shell fails # This will display more precise answer if something in TCL shell fails
result = self.tcl.eval("set errorInfo") 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: 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 # Show error in console and just return or in test raise exception
if reraise: if reraise:
raise e raise e

View File

@ -20,6 +20,7 @@ CHANGELOG for FlatCAM beta
- optimized the Gerber UI - 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 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) - 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 29.05.2020