Skip to content

Commit

Permalink
Another fix to prevent concurrent rendering in composer
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11198 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jul 29, 2009
1 parent 194e2b3 commit 09dad79
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/composer/qgscomposermap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ void QgsComposerMap::paint( QPainter* painter, const QStyleOptionGraphicsItem* i
else if ( mComposition->plotStyle() == QgsComposition::Print ||
mComposition->plotStyle() == QgsComposition::Postscript )
{
if ( mDrawing )
{
return;
}

mDrawing = true;
QPaintDevice* thePaintDevice = painter->device();
if ( !thePaintDevice )
{
Expand All @@ -233,6 +239,7 @@ void QgsComposerMap::paint( QPainter* painter, const QStyleOptionGraphicsItem* i
QRectF bRect = boundingRect();
QSize theSize( bRect.width(), bRect.height() );
draw( painter, mExtent, theSize, 25.4 ); //scene coordinates seem to be in mm
mDrawing = false;
}

drawFrame( painter );
Expand Down

0 comments on commit 09dad79

Please sign in to comment.