diff --git a/libs/qsynedit/qsynedit/qsynedit.cpp b/libs/qsynedit/qsynedit/qsynedit.cpp index 1bbb7d55..a6ed8e45 100644 --- a/libs/qsynedit/qsynedit/qsynedit.cpp +++ b/libs/qsynedit/qsynedit/qsynedit.cpp @@ -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)