Skip to content
Permalink
Browse files
Followup effbfcd, better fix for #12747. The previous fix broke
print exports of grid frames under OSX.
  • Loading branch information
nyalldawson committed May 30, 2015
1 parent 3530e4c commit 196d7a083ef7724b2fdcb2dbea9e31e9be1b0bed
Showing with 4 additions and 5 deletions.
  1. +4 −5 src/core/composer/qgscomposermapgrid.cpp
@@ -668,12 +668,11 @@ void QgsComposerMapGrid::draw( QPainter* p )

p->restore();

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

if ( mGridFrameStyle != QgsComposerMapGrid::NoFrame )

0 comments on commit 196d7a0

Please sign in to comment.