aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/printlayout.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-09 11:19:08 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-09 11:19:08 -0700
commit2d77788cb2fe293b72cff7f51a200d90c928dcea (patch)
tree37b7f4f9202430b0f2f04f8262a18ce7a69ddbeb /qt-ui/printlayout.cpp
parent99859d9a07d06ff080b52bfe5af1861d4ccfa6d3 (diff)
downloadsubsurface-2d77788cb2fe293b72cff7f51a200d90c928dcea.tar.gz
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>
Diffstat (limited to 'qt-ui/printlayout.cpp')
-rw-r--r--qt-ui/printlayout.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp
index 9f507a394..1c0a82829 100644
--- a/qt-ui/printlayout.cpp
+++ b/qt-ui/printlayout.cpp
@@ -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 */