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.
This commit is contained in:
Levi Jetzer
2026-10-08 14:24:07 +02:00
parent 7c6a0411d4
commit 110a16348a
+2 -2
View File
@@ -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