forked from qt-creator/qt-creator
texteditor: do not allow block selection to modify readonly editors
Task-number: QTCREATORBUG-5391 Change-Id: Icd896f39c183a0bf5e402ad65189b009dabdadc1 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
@@ -1819,7 +1819,7 @@ void BaseTextEditorWidget::keyPressEvent(QKeyEvent *e)
|
||||
break;
|
||||
}
|
||||
|
||||
if (d->m_inBlockSelectionMode) {
|
||||
if (!ro && d->m_inBlockSelectionMode) {
|
||||
QString text = e->text();
|
||||
if (!text.isEmpty() && (text.at(0).isPrint() || text.at(0) == QLatin1Char('\t'))) {
|
||||
d->removeBlockSelection(text);
|
||||
|
||||
Reference in New Issue
Block a user