diff options
-rw-r--r-- | qt-ui/printlayout.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp index 384a0efd2..c8e16213c 100644 --- a/qt-ui/printlayout.cpp +++ b/qt-ui/printlayout.cpp @@ -193,10 +193,14 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn) } QTransform origTransform = painter.transform(); + QImage image(scaledW, scaledH - tableH - padPT, QImage::Format_ARGB32); + QPainter imgPainter(&image); // draw a profile painter.translate((scaledW + padW) * col, (scaledH + padH) * row + yOffsetProfile); profile->plotDive(dive, true); // make sure the profile is actually redrawn - profile->render(&painter, QRect(0, 0, scaledW, scaledH - tableH - padPT)); + profile->render(&imgPainter, QRect(0, 0, scaledW, scaledH - tableH - padPT)); + imgPainter.end(); + painter.drawImage(image.rect(),image); painter.setTransform(origTransform); // draw a table |