[QGIS Commit] r12689 - trunk/qgis/src/core/composer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Jan 7 08:49:33 EST 2010


Author: mhugent
Date: 2010-01-07 08:49:33 -0500 (Thu, 07 Jan 2010)
New Revision: 12689

Modified:
   trunk/qgis/src/core/composer/qgscomposermap.cpp
Log:
Emit extentChanged signal in composer map after drawing to prevent concurrent layer access with table items

Modified: trunk/qgis/src/core/composer/qgscomposermap.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposermap.cpp	2010-01-07 13:29:23 UTC (rev 12688)
+++ trunk/qgis/src/core/composer/qgscomposermap.cpp	2010-01-07 13:49:33 UTC (rev 12689)
@@ -365,9 +365,9 @@
     mExtent.setXMaximum( mExtent.xMaximum() + dx );
     mExtent.setYMinimum( mExtent.yMinimum() + dy );
     mExtent.setYMaximum( mExtent.yMaximum() + dy );
-    emit extentChanged();
     cache();
     update();
+    emit extentChanged();
   }
 }
 
@@ -433,9 +433,9 @@
   mExtent.setYMaximum( centerY + newIntervalY / 2 );
   mExtent.setYMinimum( centerY - newIntervalY / 2 );
 
-  emit extentChanged();
   cache();
   update();
+  emit extentChanged();
 }
 
 void QgsComposerMap::setSceneRect( const QRectF& rectangle )
@@ -450,13 +450,14 @@
   double newHeight = mExtent.width() * h / w ;
   mExtent = QgsRectangle( mExtent.xMinimum(), mExtent.yMinimum(), mExtent.xMaximum(), mExtent.yMinimum() + newHeight );
   mCacheUpdated = false;
-  emit extentChanged();
+
   if ( mPreviewMode != Rectangle )
   {
     cache();
   }
   updateBoundingRect();
   update();
+  emit extentChanged();
 }
 
 void QgsComposerMap::setNewExtent( const QgsRectangle& extent )
@@ -487,9 +488,9 @@
   double scaleRatio = scaleDenominator / currentScaleDenominator;
   mExtent.scale( scaleRatio );
   mCacheUpdated = false;
-  emit extentChanged();
   cache();
   update();
+  emit extentChanged();
 }
 
 void QgsComposerMap::setOffset( double xOffset, double yOffset )



More information about the QGIS-commit mailing list