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@11198 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jul 29, 2009
1 parent f0b412a commit c82c068
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/composer/qgscomposermap.cpp
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 c82c068

Please sign in to comment.