boemann added a comment.
The idea is that if we are at the beginning of a new page we don't get in here (virginpage is true) so we only reset if we are somewhere down on a page meaning we wil have more space to try on next time around But we should reset if the only thing we fitted was the table header as a table headerrow should never be the only thing on a page One reason why this might fail is if virginpage becomes false when we add the table headerrow (if we can fix this and that doesn't have other ill effect then I would prefer such a solution). So find out where we set virginpage to false, and make sure it doesn't go from true to false when adding the header row I hope this makes sense REPOSITORY R8 Calligra REVISION DETAIL https://phabricator.kde.org/D15428 To: anthonyfieroni, #calligra:_3.0, danders, boemann Cc: Calligra-Devel-list, dcaliste, cochise, vandenoever