Skip to content

Commit

Permalink
Clear WMS preview image
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Oct 31, 2017
1 parent fde6240 commit 9d4ab51
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -616,6 +616,7 @@ static void _drawDebugRect( QPainter& p, const QRectF& rect, const QColor& color
QImage *QgsWmsProvider::draw( QgsRectangle const & viewExtent, int pixelWidth, int pixelHeight, QgsRasterBlockFeedback* feedback )
{
QImage* image = new QImage( pixelWidth, pixelHeight, QImage::Format_ARGB32 );
image->fill( 0 );

if ( QgsApplication::instance()->thread() == QThread::currentThread() )
{
Expand All @@ -624,9 +625,6 @@ QImage *QgsWmsProvider::draw( QgsRectangle const & viewExtent, int pixelWidth, i
}

// compose the URL query string for the WMS server.

image->fill( 0 );

if ( !mSettings.mTiled && mSettings.mMaxWidth == 0 && mSettings.mMaxHeight == 0 )
{
QUrl url = createRequestUrlWMS( viewExtent, pixelWidth, pixelHeight );
Expand Down

0 comments on commit 9d4ab51

Please sign in to comment.