I hit `s` by mistake...

Issue #396 resolved
Leandro Heck created an issue

Then the TCL shell was closed…

I didn’t know that this is a toggle key, so I used the mouse to click on the folder icon with TCL written inside of it to open the shell again. But it can’t open it again when the `s` shortcut was used in the first place.

Using v8.991 on Ubuntu 19.10

Comments (5)

  1. Marius Stanciu

    The key S is used as a shortcut with toggle effect for the TCL Command Line.
    All the shortcut keys can be seen in the Shortcut List accessible by pressing the key F3 or by clicking the menu entry Menu → Help → Shortcuts Link.

    The TCL Shell can be open by:

    1. Click (toggle effect) on the icon in the Toolbar that looks like a square with a symbol inside >- and not the one like a folder and with TCL inside (which has another purpose).

    2. Press S key (toggle effect) which is the shortcut key for TCL shell

    3. Use the menu entry from: Menu → Tool → Command Line

    Please hover a bit over the icons and a ToolTip will appear giving you a hint about what clicking there will do.
    And also, please open an issue after you tried multiple times and have seen a reproducible issue which you will describe as best as possible in the text of the opened issue including a way to reproduce the erratic behavior and/or bug.
    Thank you.

  2. Leandro Heck reporter

    Yes, I do it a lot. The tool is really good in that way.

    But I am a really good user clicking on everything all the time. I really learn by clicking and using it instead of just looking at the tool like normal users.

    Maybe because of my behavior in front of the tool, it can be in a not known state. I clicked that TCL Folder once, and the terminal just opened, Instead of bringing me with the file selector how it is doing right now.

    That being said, I prefer to ask, since I see many issues when I am using it and I was not able to produce an automated workflow that works for me yet. I have many issues in the process and I just need to make simple things like isolation routing, copper clean, holes, edge cuts and it is done. I want that because my CNC has many processes and everything that can be automated is a real improvement from my perspective.

  3. Marius Stanciu

    I clicked that TCL Folder once, and the terminal just opened, Instead of bringing me with the file selector how it is doing right now.

    I’m sorry but this is impossible. The ‘triggered’ signal of that toolbar action (the one with an icon like a folder with Tcl written inside) is connected to a slot that will open a file selector to load a script file.

    See the function that is connecting the toolbar actions triggered signals to the correspondent slots. With red is marked for the actual TcL Shell action (shortcut key S) and with yellow is marked the line for the Open Script action (the one with the icon as a folder and Tcl written inside).

    and here is the body of the method that is connected to the action with the icon as a folder and Tcl written inside:

        def on_fileopenscript(self, name=None, silent=False):
            """
            Will open a Tcl script file into the Code Editor
    
            :param silent: if True will not display status messages
            :param name: name of a Tcl script file to open
            :return:
            """
    
            self.report_usage("on_fileopenscript")
            App.log.debug("on_fileopenscript()")
    
            _filter_ = "TCL script (*.FlatScript);;TCL script (*.TCL);;TCL script (*.TXT);;All Files (*.*)"
    
            if name:
                filenames = [name]
            else:
                try:
                    filenames, _f = QtWidgets.QFileDialog.getOpenFileNames(
                        caption=_("Open TCL script"), directory=self.get_last_folder(), filter=_filter_)
                except TypeError:
                    filenames, _f = QtWidgets.QFileDialog.getOpenFileNames(caption=_("Open TCL script"), filter=_filter_)
    
            if len(filenames) == 0:
                if silent is False:
                    self.inform.emit('[WARNING_NOTCL] %s' % _("Open TCL script cancelled."))
            else:
                for filename in filenames:
                    if filename != '':
                        self.worker_task.emit({'fcn': self.open_script, 'params': [filename]})
    

    As you can see there is nothing here to toggle the Tcl shell.

    As opposed to the method that really toggle the Tcl Shell:

        def on_toggle_shell(self):
            """
            Toggle shell: if is visible close it, if it is closed then open it
            :return: None
            """
    
            self.report_usage("on_toggle_shell()")
    
            if self.ui.shell_dock.isVisible():
                self.ui.shell_dock.hide()
            else:
                self.ui.shell_dock.show()
    

    I hope it is clear for you too now.

  4. Leandro Heck reporter

    I see. Thank you for explaining me that. Something weird has happen. But now (testing it again here) it does not happen anymore. Sorry for this mistake.

  5. Log in to comment