From d38372605c7e23bc364143f1f3116b4e443fd53e Mon Sep 17 00:00:00 2001 From: Max Last Date: Thu, 31 Oct 2024 10:20:36 +0000 Subject: [PATCH] nuke 14 panel bugfix --- PythonEditor/ui/editor.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PythonEditor/ui/editor.py b/PythonEditor/ui/editor.py index 4520917..e910625 100644 --- a/PythonEditor/ui/editor.py +++ b/PythonEditor/ui/editor.py @@ -293,6 +293,15 @@ def keyPressEvent(self, event): that QShortcut cannot override. """ self._key_pressed = True + + # Nuke 14 bugfix - override Spacebar to + # prevent the window from expanding + if event.key() == Qt.Key_Space: + event.accept() + # print("editor: space") + self.textCursor().insertText(" ") + self.post_key_pressed_signal.emit(event) + return if not self.hasFocus(): event.ignore()