Skip to content

Commit 196d7a0

Browse files
committedMay 30, 2015
Followup effbfcd, better fix for #12747. The previous fix broke
print exports of grid frames under OSX.
1 parent 3530e4c commit 196d7a0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed
 

‎src/core/composer/qgscomposermapgrid.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -668,12 +668,11 @@ void QgsComposerMapGrid::draw( QPainter* p )
668668

669669
p->restore();
670670

671-
//QPainter::setClipping(false) seems to be broken on OSX (#12747), setClipRect
672-
//fails on other platforms...
673-
#ifndef Q_OS_MAC
674671
p->setClipping( false );
675-
#else
676-
p->setClipRect( thisPaintRect, Qt::NoClip );
672+
#ifdef Q_OS_MAC
673+
//QPainter::setClipping(false) seems to be broken on OSX (#12747). So we hack around it by
674+
//setting a larger clip rect
675+
p->setClipRect( mComposerMap->mapRectFromScene( mComposerMap->sceneBoundingRect() ).adjusted( -10, -10, 10, 10 ) );
677676
#endif
678677

679678
if ( mGridFrameStyle != QgsComposerMapGrid::NoFrame )

0 commit comments

Comments
 (0)
Please sign in to comment.