From 110a16348afa90e1919b34e22e44ff9f9ced5aa1 Mon Sep 17 00:00:00 2001 From: Levi Jetzer Date: Thu, 8 Oct 2026 14:24:07 +0200 Subject: [PATCH] Swap Ctrl/Alt arrow shortcuts in the diagram editor The element editor moves the selection in fine steps with Ctrl+arrow. The diagram editor used Alt+arrow for its fine movement and Ctrl+arrow for aligning a text group, so the same modifier did different things in the two editors. Swap the two so the diagram editor matches the element editor: - Ctrl+arrow: fine movement (unchanged step, still configurable via diagrameditor/key_fine_Xgrid and key_fine_Ygrid) - Alt+arrow: align the selected text group (Left/Up/Right) Only the modifier checks change, the behaviour of each action is untouched. --- sources/diagram.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/diagram.cpp b/sources/diagram.cpp index 75a9051ba..c337caf4a 100644 --- a/sources/diagram.cpp +++ b/sources/diagram.cpp @@ -641,7 +641,7 @@ void Diagram::keyPressEvent(QKeyEvent *event) return; } } - else if(event->modifiers() == Qt::AltModifier) + else if(event->modifiers() == Qt::ControlModifier) { QSettings settings; int xKeyGridFine = settings.value(QStringLiteral("diagrameditor/key_fine_Xgrid"), @@ -684,7 +684,7 @@ void Diagram::keyPressEvent(QKeyEvent *event) return; } } - else if(event->modifiers() == Qt::ControlModifier) + else if(event->modifiers() == Qt::AltModifier) { //Adjust the alignment of a texts group if(selectedItems().size() == 1