Am 10.06.2007 um 17:12 schrieb Alfredo Braunstein:
Alfredo Braunstein wrote: if (maxsize > font.size()) { + // use standard paragraph font with the maximal size font.setSize(maxsize); - maxasc = max(maxasc, fontmetrics.maxAscent()); - maxdesc = max(maxdesc, fontmetrics.maxDescent());+ FontMetrics const & maxfontmetrics = theFontMetrics (font);+ maxasc = max(maxasc, maxfontmetrics.maxAscent()); + }I would add a comment saying that the fontmetrics variable is outdated once you change 'font'. Otherwise there's the risk we hit this bug again andagain...
I make a copy now. So it should be clear. I think it's obvious that the fontmetric does not adapt if the font is changed. The update was just forgotten.
Stefan
PGP.sig
Description: Signierter Teil der Nachricht