mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 02:28:35 +00:00
Row breaking: keep unused tail for later (instead of assertion)
Instead of asserting when there are unprocessed row elements (which, as I understand it, should almost never happen), play safe and keep them for later processing. Related to bug #12617.
This commit is contained in:
parent
cb3de88cc4
commit
9dd716da3a
@ -1131,7 +1131,9 @@ RowList TextMetrics::breakParagraph(Row const & bigrow) const
|
||||
rb.push_back(elt);
|
||||
rb.finalizeLast();
|
||||
if (rb.width() > width) {
|
||||
LATTEST(tail.empty());
|
||||
// Keep the tail for later; this ought to be rare, but play safe.
|
||||
if (!tail.empty())
|
||||
fcit.put(tail);
|
||||
// if the row is too large, try to cut at last separator.
|
||||
tail = rb.shortenIfNeeded(width, next_width);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user