forked from qt-creator/qt-creator
Editor: Optimize out viewport update.
Change-Id: If4661d68d30e5ba36efbba3376242631ec0402d4 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user