Commit 6cac6f0e authored by David Schulz's avatar David Schulz

Editor: Optimize out viewport update.

Change-Id: If4661d68d30e5ba36efbba3376242631ec0402d4
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent d6d233f5
......@@ -6230,11 +6230,12 @@ bool BaseTextEditorWidget::inFindScope(int selectionStart, int selectionEnd)
void BaseTextEditorWidget::setBlockSelection(bool on)
{
if (d->m_inBlockSelectionMode != on) {
d->m_inBlockSelectionMode = on;
if (on)
d->m_blockSelection.fromSelection(d->m_document->tabSettings(), textCursor());
}
if (d->m_inBlockSelectionMode == on)
return;
d->m_inBlockSelectionMode = on;
if (on)
d->m_blockSelection.fromSelection(d->m_document->tabSettings(), textCursor());
viewport()->update();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment