[QGIS Commit] r11736 - in trunk/qgis/src: app/composer core/composer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Sep 30 07:45:20 EDT 2009


Author: mhugent
Date: 2009-09-30 07:45:19 -0400 (Wed, 30 Sep 2009)
New Revision: 11736

Modified:
   trunk/qgis/src/app/composer/qgscomposer.cpp
   trunk/qgis/src/core/composer/qgscomposermap.cpp
   trunk/qgis/src/core/composer/qgscomposermap.h
Log:
Some cleanups in composer map and disable a recent change in composer that may lead to segfaults on some systems

Modified: trunk/qgis/src/app/composer/qgscomposer.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposer.cpp	2009-09-30 07:14:54 UTC (rev 11735)
+++ trunk/qgis/src/app/composer/qgscomposer.cpp	2009-09-30 11:45:19 UTC (rev 11736)
@@ -303,6 +303,7 @@
 void QgsComposer::paintEvent( QPaintEvent* event )
 {
   QMainWindow::paintEvent( event );
+#if 0 //MH: disabled for now as there are segfaults on some systems
   //The cached content of the composer maps need to be recreated it is the first paint event of the composer after reading from XML file.
   //Otherwise the resolution of the composer map is not suitable for screen
   if ( mFirstPaint )
@@ -313,12 +314,13 @@
       QgsComposerMap* cm = dynamic_cast<QgsComposerMap*>( it.key() );
       if ( cm )
       {
+        mFirstPaint = false;
         cm->cache();
         cm->update();
       }
     }
-    mFirstPaint = false;
   }
+#endif //0
 }
 
 void QgsComposer::activate()

Modified: trunk/qgis/src/core/composer/qgscomposermap.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposermap.cpp	2009-09-30 07:14:54 UTC (rev 11735)
+++ trunk/qgis/src/core/composer/qgscomposermap.cpp	2009-09-30 11:45:19 UTC (rev 11736)
@@ -252,8 +252,6 @@
 
 
   painter->restore();
-
-  mLastScaleFactorX =  currentScaleFactorX;
 }
 
 void QgsComposerMap::updateCachedImage( void )
@@ -542,12 +540,6 @@
   }
   composerMapElem.appendChild( layerSetElem );
 
-#if 0
-  // why is saving the map changing anything about the cache?
-  mCacheUpdated = false;
-  mNumCachedLayers = 0;
-#endif
-
   elem.appendChild( composerMapElem );
   return _writeXML( composerMapElem, doc );
 }

Modified: trunk/qgis/src/core/composer/qgscomposermap.h
===================================================================
--- trunk/qgis/src/core/composer/qgscomposermap.h	2009-09-30 07:14:54 UTC (rev 11735)
+++ trunk/qgis/src/core/composer/qgscomposermap.h	2009-09-30 11:45:19 UTC (rev 11736)
@@ -181,12 +181,6 @@
     /** \brief set to true if in state of drawing. Concurrent requests to draw method are returned if set to true */
     bool mDrawing;
 
-    /**Store last scale factor to avoid unnecessary repaints in case preview mode is 'Render'*/
-    double mLastScaleFactorX;
-
-    /**Store the last map extent to decide if cache needs to be updatet*/
-    QgsRectangle mCachedMapExtent;
-
     /**Offset in x direction for showing map cache image*/
     double mXOffset;
     /**Offset in y direction for showing map cache image*/



More information about the QGIS-commit mailing list