forked from qt-creator/qt-creator
Fix ambiguous shortcut problems
The dummy shortcut eater did not always work, we sometimes do have mutual exclusive shortcuts in the same context. The current solution is simpler: ignore text input when the control modifier is used. This seems to be in line with other toolkits and applications. Done with: thorbjorn
This commit is contained in:
@@ -1176,7 +1176,7 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e)
|
||||
|
||||
if (ro || e->text().isEmpty() || !e->text().at(0).isPrint()) {
|
||||
QPlainTextEdit::keyPressEvent(e);
|
||||
} else {
|
||||
} else if ((e->modifiers() & Qt::ControlModifier) != Qt::ControlModifier){
|
||||
QTextCursor cursor = textCursor();
|
||||
QString text = e->text();
|
||||
QString autoText = autoComplete(cursor, text);
|
||||
|
||||
Reference in New Issue
Block a user