- using 'Escape' key shortcut while the focus is in the Tcl Shell command line will set focus on the main canvas

This commit is contained in:
Marius Stanciu
2020-11-25 21:14:18 +02:00
committed by Marius
parent 9b08c51bba
commit fb983872d0
7 changed files with 58 additions and 49 deletions

View File

@@ -3986,6 +3986,8 @@ class _ExpandableTextEdit(FCTextEdit):
self.completer.insertText.connect(self.insertCompletion)
self.completer.popup().clicked.connect(self.insert_completion_click)
self.on_escape_key = lambda: None
def set_model_data(self, keyword_list):
self.model.setStringList(keyword_list)
@@ -4054,6 +4056,8 @@ class _ExpandableTextEdit(FCTextEdit):
return
elif event.matches(QKeySequence.MoveToNextPage) or event.matches(QKeySequence.MoveToPreviousPage):
return self._termWidget.browser().keyPressEvent(event)
elif event.key() == QtCore.Qt.Key_Escape:
self.on_escape_key()
tc = self.textCursor()