From c82c068d016384dfb3842a47263e22d424dc1c58 Mon Sep 17 00:00:00 2001 From: mhugent Date: Wed, 29 Jul 2009 10:51:24 +0000 Subject: [PATCH] Another fix to prevent concurrent rendering in composer git-svn-id: http://svn.osgeo.org/qgis/trunk@11198 c8812cc2-4d05-0410-92ff-de0c093fc19c --- src/core/composer/qgscomposermap.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/composer/qgscomposermap.cpp b/src/core/composer/qgscomposermap.cpp index 27170d9c1336..58e4a83fb21c 100644 --- a/src/core/composer/qgscomposermap.cpp +++ b/src/core/composer/qgscomposermap.cpp @@ -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 ) { @@ -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 );