mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
copy WMS image if there is user transparency
git-svn-id: http://svn.osgeo.org/qgis/trunk@10267 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
f882040718
commit
707550aeee
@ -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;
|
||||
@ -1569,6 +1571,11 @@ bool QgsRasterLayer::draw( QgsRenderContext& rendererContext )
|
||||
),
|
||||
*image );
|
||||
|
||||
if(mTransparencyLevel != 255)
|
||||
{
|
||||
delete image;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user