diff --git a/libs/qsynedit/qsynedit/document.cpp b/libs/qsynedit/qsynedit/document.cpp index ef08e905..229315dd 100644 --- a/libs/qsynedit/qsynedit/document.cpp +++ b/libs/qsynedit/qsynedit/document.cpp @@ -1334,9 +1334,9 @@ int DocumentLine::glyphWidth(int i) return calcSegmentInterval(mGlyphStartPositionList, mWidth, i); } -int DocumentLine::width(bool forceUpdate) +int DocumentLine::width() { - if(mWidth<0 || forceUpdate) + if(mWidth<0) updateWidth(); return mWidth; } diff --git a/libs/qsynedit/qsynedit/document.h b/libs/qsynedit/qsynedit/document.h index f838cefb..811f7f94 100644 --- a/libs/qsynedit/qsynedit/document.h +++ b/libs/qsynedit/qsynedit/document.h @@ -68,17 +68,13 @@ private: * * @return the glyphs count */ - int glyphsCount() const { - return mGlyphStartCharList.length(); - } + int glyphsCount() const { return mGlyphStartCharList.length(); } /** * @brief get list of start index of the glyphs in the line text * @return start indice of the glyph. */ - const QList& glyphStartCharList() const { - return mGlyphStartCharList; - } + const QList& glyphStartCharList() const { return mGlyphStartCharList; } /** * @brief get list of start position of the glyphs in the line text @@ -131,7 +127,7 @@ private: * @brief get the width (pixel) of the line text * @return the width (in width) */ - int width(bool forceUpdate=false); + int width(); /** * @brief get the state of the syntax highlighter after this line is parsed