[QGIS Commit] r14053 - in trunk/qgis: python/core src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Aug 11 03:43:19 EDT 2010


Author: wonder
Date: 2010-08-11 07:43:19 +0000 (Wed, 11 Aug 2010)
New Revision: 14053

Modified:
   trunk/qgis/python/core/qgsmaplayer.sip
   trunk/qgis/src/core/qgsmaplayer.cpp
Log:
Fixed setCacheImage() python binding.


Modified: trunk/qgis/python/core/qgsmaplayer.sip
===================================================================
--- trunk/qgis/python/core/qgsmaplayer.sip	2010-08-11 07:20:00 UTC (rev 14052)
+++ trunk/qgis/python/core/qgsmaplayer.sip	2010-08-11 07:43:19 UTC (rev 14053)
@@ -283,7 +283,7 @@
     QImage *cacheImage();
     /** Set the QImage used for caching render operations 
      * @note This method was added in QGIS 1.4 **/
-    void setCacheImage( QImage * thepImage ); 
+    void setCacheImage( QImage * thepImage /Transfer/ ); 
 
 public slots:
 

Modified: trunk/qgis/src/core/qgsmaplayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsmaplayer.cpp	2010-08-11 07:20:00 UTC (rev 14052)
+++ trunk/qgis/src/core/qgsmaplayer.cpp	2010-08-11 07:43:19 UTC (rev 14053)
@@ -843,6 +843,9 @@
 void QgsMapLayer::setCacheImage( QImage * thepImage )
 {
   QgsDebugMsg( "cache Image set!" );
+  if ( mpCacheImage == thepImage )
+    return;
+  
   if ( mpCacheImage )
   {
     delete mpCacheImage;



More information about the QGIS-commit mailing list