From 89d03e55031a2ebe8818fd31dbe97e0f5630dfb0 Mon Sep 17 00:00:00 2001 From: Laurent Trinques Date: Sat, 21 May 2022 23:28:44 +0200 Subject: [PATCH] Element editor : Workaround for Qt::Key_Space event not working Use of ALT key as a replacement to rotate terminal on the fly before placing it in the drawing. Fix bug #262 https://qelectrotech.org/bugtracker/view.php?id=262 --- sources/editor/esevent/eseventaddterminal.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/editor/esevent/eseventaddterminal.cpp b/sources/editor/esevent/eseventaddterminal.cpp index 70f94ca70..f9c33b5a7 100644 --- a/sources/editor/esevent/eseventaddterminal.cpp +++ b/sources/editor/esevent/eseventaddterminal.cpp @@ -87,7 +87,8 @@ bool ESEventAddTerminal::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { @return */ bool ESEventAddTerminal::keyPressEvent(QKeyEvent *event) { - if (event -> key() == Qt::Key_Space) { + if (event -> key() == Qt::Key_Alt) { + switch (m_terminal->orientation()) { case Qet::North : m_terminal -> setOrientation(Qet::East);