mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Printing: force redrawing of the profile
If the first dive we end up rendering is the dive currently shown, the info overlay would end up being printed which looks really silly. See #590 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
99859d9a07
commit
2d77788cb2
3 changed files with 8 additions and 12 deletions
|
@ -183,7 +183,7 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn)
|
|||
|
||||
// draw a profile
|
||||
painter.translate((scaledW + padW) * col, (scaledH + padH) * row + yOffsetProfile);
|
||||
profile->plotDive(dive);
|
||||
profile->plotDive(dive, true); // make sure the profile is actually redrawn
|
||||
profile->render(&painter, QRect(0, 0, scaledW, scaledH - tableH - padPT));
|
||||
painter.setTransform(origTransform);
|
||||
|
||||
|
@ -202,7 +202,8 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn)
|
|||
profile->setFrameStyle(profileFrameStyle);
|
||||
profile->setPrintMode(false);
|
||||
profile->resize(originalSize);
|
||||
profile->plotDive();
|
||||
// we need to force a redraw of the profile so it switches back from print mode
|
||||
profile->plotDive(0, true);
|
||||
}
|
||||
|
||||
/* we create a table that has a fixed height, but can stretch to fit certain width */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue