Editor: Allow creating block selections with alt+shift again

These block selections are a convenience for people used to the block
selection allowing to also unselect parts again (at least as long as
alt+shift is pressed).

Fixes: QTCREATORBUG-26535
Fixes: QTCREATORBUG-26529
Change-Id: I19558dc1d823c268cc1cfda0ea8151bac483701f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
David Schulz
2021-11-05 08:56:49 +01:00
parent af7d9d6f8e
commit e0c115fb9b
5 changed files with 117 additions and 3 deletions

View File

@@ -294,7 +294,7 @@ static QTextLine currentTextLine(const QTextCursor &cursor)
return layout->lineForTextPosition(relativePos);
}
bool multiCursorAddEvent(QKeyEvent *e, QKeySequence::StandardKey matchKey)
bool MultiTextCursor::multiCursorAddEvent(QKeyEvent *e, QKeySequence::StandardKey matchKey)
{
uint searchkey = (e->modifiers() | e->key())
& ~(Qt::KeypadModifier