https://bugs.kde.org/show_bug.cgi?id=405075
--- Comment #2 from Ralf Habacker <[email protected]> --- Created attachment 118537 --> https://bugs.kde.org/attachment.cgi?id=118537&action=edit Generated file (variant 2) The overlapping header/footer issue showed with attachment 118535 was generated with the following fix applied, which tries to fix a header offset issue. commit 76a2b05015832fd903b8a760ba2aeb2e8f484864 (temp) Author: Ralf Habacker <[email protected]> Date: Mon Mar 4 13:37:30 2019 +0100 Fix geometry change in diagram header and footer When outputting to a printer, the geometry of a diagram changes, but a corresponding adjustment request was not passed on to the header and footer layout. CCBUG:405061 diff --git a/src/KChart/KChartChart.cpp b/src/KChart/KChartChart.cpp index fa14b8a..6976e76 100644 --- a/src/KChart/KChartChart.cpp +++ b/src/KChart/KChartChart.cpp @@ -1382,6 +1382,10 @@ void Chart::paint( QPainter* painter, const QRect& target ) d->isFloatingLegendsLayoutDirty = true; invalidateLayoutTree( d->dataAndLegendLayout ); d->dataAndLegendLayout->setGeometry( QRect( QPoint(), target.size() ) ); + invalidateLayoutTree( d->headerLayout ); + d->headerLayout->setGeometry( QRect( QPoint(), target.size() ) ); + invalidateLayoutTree( d->footerLayout ); + d->footerLayout->setGeometry( QRect( QPoint(), target.size() ) ); } d->overrideSize = target.size(); @@ -1391,6 +1395,10 @@ void Chart::paint( QPainter* painter, const QRect& target ) if ( differentSize ) { invalidateLayoutTree( d->dataAndLegendLayout ); d->dataAndLegendLayout->setGeometry( oldGeometry ); + invalidateLayoutTree( d->headerLayout ); + d->headerLayout->setGeometry( oldGeometry ); + invalidateLayoutTree( d->footerLayout ); + d->footerLayout->setGeometry( oldGeometry ); d->isPlanesLayoutDirty = true; d->isFloatingLegendsLayoutDirty = true; } While the patch fixes some of the offset issues, it seems to not be complete. To be able to see the original state, a generated pdf file without this patch has been added with this comment. -- You are receiving this mail because: You are watching all bug changes.
