Followup effbfcd, better fix for #12747. The previous fix broke

print exports of grid frames under OSX.
This commit is contained in:
Nyall Dawson 2015-05-30 14:27:15 +10:00
parent 3530e4c205
commit 196d7a083e

View File

@ -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 )