TextEditor: Only disable block selection when we have one.

This reduces unnecessary calls to ensureCursorVisible.

Task-number: QTCREATORBUG-12860
Change-Id: Iaf59642f3cee645f75d5319d3f6adc236b3f2ee2
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
David Schulz
2014-09-24 15:04:09 +02:00
committed by Christian Stenger
parent 92f94ab4b1
commit bc30d602aa

View File

@@ -5862,7 +5862,8 @@ void BaseTextEditorWidget::cut()
void BaseTextEditorWidget::selectAll()
{
d->disableBlockSelection();
if (d->m_inBlockSelectionMode)
d->disableBlockSelection();
QPlainTextEdit::selectAll();
}