fix: current top line changed after change font size.

This commit is contained in:
Roy Qu 2024-04-23 17:51:30 +08:00
parent 198ff102ac
commit 565e7914f8
1 changed files with 5 additions and 2 deletions

View File

@ -3230,9 +3230,12 @@ void QSynEdit::recalcCharExtent()
}
mTextHeight *= mLineSpacingFactor;
setTopPos(currentTopRow * mTextHeight);
setLeftPos(currentLeftCol * mCharWidth);
onSizeOrFontChanged();
int newTopPos = currentTopRow * mTextHeight;
setTopPos(newTopPos);
if (newTopPos!=mTopPos)
mTopPos = newTopPos;
setLeftPos(currentLeftCol * mCharWidth);
}
QString QSynEdit::expandAtWideGlyphs(const QString &S)