Skip to content

Commit

Permalink
copy WMS image if there is user transparency
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@10267 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Mar 9, 2009
1 parent f882040 commit 707550a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/raster/qgsrasterlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1538,6 +1538,8 @@ bool QgsRasterLayer::draw( QgsRenderContext& rendererContext )

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;
Expand Down Expand Up @@ -1569,6 +1571,11 @@ bool QgsRasterLayer::draw( QgsRenderContext& rendererContext )
),
*image );

if(mTransparencyLevel != 255)
{
delete image;
}

}
else
{
Expand Down

0 comments on commit 707550a

Please sign in to comment.