From 8faa2c0aa6c9f74d1000889f7cfe7f1b7f15b1fe Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Tue, 7 May 2024 12:18:13 +0800 Subject: [PATCH] optimization: don't recalculate glyph positions in selected lines. --- libs/qsynedit/qsynedit/painter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/qsynedit/qsynedit/painter.cpp b/libs/qsynedit/qsynedit/painter.cpp index d47bb3c0..97421f8e 100644 --- a/libs/qsynedit/qsynedit/painter.cpp +++ b/libs/qsynedit/qsynedit/painter.cpp @@ -1068,7 +1068,7 @@ void QSynEditPainter::paintLines() // Values in it doesn't matter, we'll recalculate them. QList glyphStartPositionsList; bool lineWidthValid = mEdit->mDocument->lineWidthValid(vLine-1); - bool calculateGlyphPositions = ( mHasSelectionInLine || lineTextChanged || !lineWidthValid); + bool calculateGlyphPositions = ( lineTextChanged || !lineWidthValid); if (calculateGlyphPositions) { glyphStartPositionsList = glyphStartCharList; } else {