optimization: don't recalculate glyph positions in selected lines.

This commit is contained in:
Roy Qu 2024-05-07 12:18:13 +08:00
parent 311fe880bb
commit 8faa2c0aa6
1 changed files with 1 additions and 1 deletions

View File

@ -1068,7 +1068,7 @@ void QSynEditPainter::paintLines()
// Values in it doesn't matter, we'll recalculate them.
QList<int> glyphStartPositionsList;
bool lineWidthValid = mEdit->mDocument->lineWidthValid(vLine-1);
bool calculateGlyphPositions = ( mHasSelectionInLine || lineTextChanged || !lineWidthValid);
bool calculateGlyphPositions = ( lineTextChanged || !lineWidthValid);
if (calculateGlyphPositions) {
glyphStartPositionsList = glyphStartCharList;
} else {