mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-09 05:24:14 +02:00
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:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user