This commit is contained in:
jkriege2 2024-01-08 21:31:18 +01:00
parent fa9773d7db
commit 1b9d0506fd

View File

@ -178,10 +178,9 @@ JKQTMathTextTextNode::LayoutInfo JKQTMathTextTextNode::calcLayout(QPainter &pain
break;
}
l.textpartXPos.append(l.width);
l.width+=hadv;
if (i==l.textpart.size()-1) l.width+=tbr.width()+qMax(0.0,tbr.x());
else l.width+=hadv;
/*
if (i==l.textpart.size()-1) l.width+=tbr.width();
else l.width+=br.width();
if (l.textpart[i].size()>0 && l.textpart[i].at(l.textpart[i].size()-1).isSpace()) {
// this correction is necessary, because it seems that QFontMetricsF::boundingRect() ignores trailing spaces
l.width+=sp;