Luca Furini wrote:
I'm going to see what happens ...
I've found the bug!
The width, stretch and shrink of the suppressed elements after a break is
taken into account in BreakingAlgorithm.addBreaks(), but this method is
called only if everythings goes well; in your test there is a restart (as
the only created node is too short) and addBreaks() is not called, so the
width (and stretch, and shrink) stored in the node is potentially wrong.
I'm going to see the best way to fix this without duplicating lines of
code. I think the "for" loop (over the elements that must be ignored)
could be moved into createNode() ...
In general, the restarting method is quite a critical phase: we are
"resurrecting" a node which was not very good, and maybe not all the
information stored inside it is always correct.