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>
This commit is contained in:
Lubomir I. Ivanov 2014-07-25 03:50:44 +03:00 committed by Dirk Hohndel
parent c51d4ce0b0
commit 50b4617cd4

View file

@ -137,9 +137,6 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn)
painter.setRenderHint(QPainter::Antialiasing); painter.setRenderHint(QPainter::Antialiasing);
painter.setRenderHint(QPainter::SmoothPixmapTransform); painter.setRenderHint(QPainter::SmoothPixmapTransform);
QPicture pic;
QPainter picPainter;
// setup the profile widget // setup the profile widget
QPointer<ProfileWidget2> profile = MainWindow::instance()->graphics(); QPointer<ProfileWidget2> profile = MainWindow::instance()->graphics();
const int profileFrameStyle = profile->frameStyle(); const int profileFrameStyle = profile->frameStyle();
@ -209,6 +206,8 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn)
painter.setTransform(origTransform); painter.setTransform(origTransform);
// draw a table // draw a table
QPicture pic;
QPainter picPainter;
painter.translate((scaledW + padW) * col, (scaledH + padH) * row + yOffsetTable); painter.translate((scaledW + padW) * col, (scaledH + padH) * row + yOffsetTable);
model.setDive(dive); model.setDive(dive);
picPainter.begin(&pic); picPainter.begin(&pic);