Note that this code is checking for being on a new page.

Change-Id: Ib92292834bc00487958ff62584025e512de6d755
Reviewed-on: https://code.wireshark.org/review/28664
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2018-07-09 20:41:07 -07:00
parent 5a560f3f6a
commit c29c043cdc
1 changed files with 4 additions and 0 deletions

View File

@ -176,6 +176,10 @@ gboolean PrintDialog::printLine(int indent, const char *line)
out_rect = cur_painter_->boundingRect(cur_printer_->pageRect(), Qt::TextWordWrap, out_line);
if (cur_printer_->pageRect().height() < page_pos_ + out_rect.height()) {
//
// We're past the end of the page, so this line will be on
// the next page.
//
if (in_preview_) {
// When generating a preview, only generate the first page;
// if we're past the first page, stop the printing process.