mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Print: remove profile border when printing
Custom widget frame styles such as 'Sunken' and 'Raised' which seem to varry between OS will be captured as well: http://harmattan-dev.nokia.com/docs/library/html/qt4/qframe.html#Shape-enum So instead we temporarily set the profile frame to QFrame::NoFrame and then restore it to the previous value. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
561d00d599
commit
7861103139
1 changed files with 3 additions and 0 deletions
|
@ -114,6 +114,8 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn)
|
|||
|
||||
// setup the profile widget
|
||||
ProfileGraphicsView *profile = mainWindow()->graphics();
|
||||
const int profileFrameStyle = profile->frameStyle();
|
||||
profile->setFrameStyle(QFrame::NoFrame);
|
||||
profile->clear();
|
||||
profile->setPrintMode(true, !printOptions->color_selected);
|
||||
QSize originalSize = profile->size();
|
||||
|
@ -178,6 +180,7 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn)
|
|||
// cleanup
|
||||
painter.end();
|
||||
delete table;
|
||||
profile->setFrameStyle(profileFrameStyle);
|
||||
profile->setPrintMode(false);
|
||||
profile->resize(originalSize);
|
||||
profile->clear();
|
||||
|
|
Loading…
Add table
Reference in a new issue