aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2014-07-25 03:50:44 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-24 21:10:30 -0700
commit50b4617cd4ba31ea9495f8538a5a4c070cdfbced (patch)
tree5ee64bf19a97f8f15a917cc06652b692f937d596
parentc51d4ce0b0199fd3c7a94ea6258f6ba177d55331 (diff)
downloadsubsurface-50b4617cd4ba31ea9495f8538a5a4c070cdfbced.tar.gz
PrintLayout: reduce the scope of 'pic' and 'picPainter'
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/printlayout.cpp5
1 files changed, 2 insertions, 3 deletions
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<ProfileWidget2> 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);