[QGIS Commit] r10267 - trunk/qgis/src/core/raster

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Mar 9 11:40:07 EDT 2009


Author: mhugent
Date: 2009-03-09 11:40:06 -0400 (Mon, 09 Mar 2009)
New Revision: 10267

Modified:
   trunk/qgis/src/core/raster/qgsrasterlayer.cpp
Log:
copy WMS image if there is user transparency

Modified: trunk/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2009-03-09 10:29:23 UTC (rev 10266)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2009-03-09 15:40:06 UTC (rev 10267)
@@ -1538,6 +1538,8 @@
 
     if(mTransparencyLevel != 255) //improve performance if layer transparency not altered
     {
+         QImage* transparentImageCopy = new QImage(*image); //copy image if there is user transparency
+         image = transparentImageCopy;
         int myWidth = image->width();
         int myHeight = image->height();
         QRgb myRgb;
@@ -1569,6 +1571,11 @@
                             ),
                             *image );
 
+    if(mTransparencyLevel != 255)
+    {
+        delete image;
+    }
+
   }
   else
   {



More information about the QGIS-commit mailing list