forked from qt-creator/qt-creator
Optimize painting after changing marks
Change-Id: Ib9e225bc063df82fcb351ff1e2572aa2d663b8a7 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
@@ -2529,6 +2529,7 @@ void BaseTextEditorWidgetPrivate::setupDocumentSignals(BaseTextDocument *documen
|
||||
q->setCursorWidth(2); // Applies to the document layout
|
||||
|
||||
QObject::connect(documentLayout, SIGNAL(updateBlock(QTextBlock)), q, SLOT(slotUpdateBlockNotify(QTextBlock)));
|
||||
QObject::connect(documentLayout, SIGNAL(updateExtraArea()), q, SLOT(slotUpdateExtraArea()));
|
||||
QObject::connect(q, SIGNAL(requestBlockUpdate(QTextBlock)), documentLayout, SIGNAL(updateBlock(QTextBlock)));
|
||||
QObject::connect(doc, SIGNAL(modificationChanged(bool)), q, SIGNAL(changed()));
|
||||
QObject::connect(doc, SIGNAL(contentsChange(int,int,int)), q,
|
||||
@@ -4113,6 +4114,11 @@ void BaseTextEditorWidget::slotUpdateBlockNotify(const QTextBlock &block)
|
||||
blockRecursion = false;
|
||||
}
|
||||
|
||||
void BaseTextEditorWidget::slotUpdateExtraArea()
|
||||
{
|
||||
d->m_extraArea->update();
|
||||
}
|
||||
|
||||
void BaseTextEditorWidget::timerEvent(QTimerEvent *e)
|
||||
{
|
||||
if (e->timerId() == d->autoScrollTimer.timerId()) {
|
||||
|
||||
Reference in New Issue
Block a user