mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
Printing: fix uninialized border width
In flow rendering the border width is not initialized which causes huge borders that blocks the page while previewing. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
This commit is contained in:
parent
20c22596f0
commit
13febc1eee
1 changed files with 2 additions and 0 deletions
|
@ -293,6 +293,8 @@ void Printer::previewOnePage()
|
||||||
pageSize.setHeight(paintDevice->height());
|
pageSize.setHeight(paintDevice->height());
|
||||||
pageSize.setWidth(paintDevice->width());
|
pageSize.setWidth(paintDevice->width());
|
||||||
webView->page()->setViewportSize(pageSize);
|
webView->page()->setViewportSize(pageSize);
|
||||||
|
// initialize the border settings
|
||||||
|
templateOptions->border_width = std::max(1, pageSize.width() / 1000);
|
||||||
webView->setHtml(t.generate());
|
webView->setHtml(t.generate());
|
||||||
|
|
||||||
// render only one page
|
// render only one page
|
||||||
|
|
Loading…
Reference in a new issue