Skip to content

Commit

Permalink
Followup effbfcd, better fix for #12747. The previous fix broke
Browse files Browse the repository at this point in the history
print exports of grid frames under OSX.
  • Loading branch information
nyalldawson committed May 30, 2015
1 parent 3530e4c commit 196d7a0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/core/composer/qgscomposermapgrid.cpp
Expand Up @@ -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 )
Expand Down

0 comments on commit 196d7a0

Please sign in to comment.