fix: update longest line width
This commit is contained in:
parent
d76ef859c5
commit
d31221ff42
|
@ -1212,6 +1212,8 @@ void Document::updateLongestLineWidth(int line, int width)
|
||||||
{
|
{
|
||||||
if (mIndexOfLongestLine<0) {
|
if (mIndexOfLongestLine<0) {
|
||||||
setIndexOfLongestLine(line);
|
setIndexOfLongestLine(line);
|
||||||
|
} else if (mIndexOfLongestLine == line) {
|
||||||
|
emitMaxLineWidthChanged();
|
||||||
} else if (mLines[mIndexOfLongestLine]->mWidth < width) {
|
} else if (mLines[mIndexOfLongestLine]->mWidth < width) {
|
||||||
setIndexOfLongestLine(line);
|
setIndexOfLongestLine(line);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue