forked from qt-creator/qt-creator
Utils: Allow combining add multi cursor events with shift
The old block selection shortcuts were used with alt + shift + up/down, but the new multi text cursor were just expecting alt + direction key for adding new cursors. In order to not break with habbits also ignore shift modifier when checking for alt + cursor move key events. Fixes: QTCREATORBUG-26503 Change-Id: I064e666a04b88c3b90d10ea35688613159f7d4a5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -296,7 +296,10 @@ static QTextLine currentTextLine(const QTextCursor &cursor)
|
||||
bool multiCursorAddEvent(QKeyEvent *e, QKeySequence::StandardKey matchKey)
|
||||
{
|
||||
uint searchkey = (e->modifiers() | e->key())
|
||||
& ~(Qt::KeypadModifier | Qt::GroupSwitchModifier | Qt::AltModifier);
|
||||
& ~(Qt::KeypadModifier
|
||||
| Qt::GroupSwitchModifier
|
||||
| Qt::AltModifier
|
||||
| Qt::ShiftModifier);
|
||||
|
||||
const QList<QKeySequence> bindings = QKeySequence::keyBindings(matchKey);
|
||||
return bindings.contains(QKeySequence(searchkey));
|
||||
|
||||
Reference in New Issue
Block a user