From 50b4617cd4ba31ea9495f8538a5a4c070cdfbced Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Fri, 25 Jul 2014 03:50:44 +0300 Subject: PrintLayout: reduce the scope of 'pic' and 'picPainter' Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- qt-ui/printlayout.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp index 318ba4e0c..d6c27b597 100644 --- a/qt-ui/printlayout.cpp +++ b/qt-ui/printlayout.cpp @@ -137,9 +137,6 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn) painter.setRenderHint(QPainter::Antialiasing); painter.setRenderHint(QPainter::SmoothPixmapTransform); - QPicture pic; - QPainter picPainter; - // setup the profile widget QPointer profile = MainWindow::instance()->graphics(); const int profileFrameStyle = profile->frameStyle(); @@ -209,6 +206,8 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn) painter.setTransform(origTransform); // draw a table + QPicture pic; + QPainter picPainter; painter.translate((scaledW + padW) * col, (scaledH + padH) * row + yOffsetTable); model.setDive(dive); picPainter.begin(&pic); -- cgit v1.2.3-70-g09d2