Skip to content

Commit

Permalink
Revert force WMS rendering in non-gui thread
Browse files Browse the repository at this point in the history
Fix #17379
  • Loading branch information
m-kuhn committed Dec 1, 2017
1 parent 3d2665f commit abb7d2a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -615,16 +615,13 @@ static void _drawDebugRect( QPainter& p, const QRectF& rect, const QColor& color

QImage *QgsWmsProvider::draw( QgsRectangle const & viewExtent, int pixelWidth, int pixelHeight, QgsRasterBlockFeedback* feedback )
{
QgsDebugMsg( "Entering." );

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

QImage* image = new QImage( pixelWidth, pixelHeight, QImage::Format_ARGB32 );
image->fill( 0 );

if ( QgsApplication::instance()->thread() == QThread::currentThread() )
{
QgsDebugMsg( "Trying to draw a WMS image on the main thread. Stop it!" );
return image;
}

// compose the URL query string for the WMS server.
if ( !mSettings.mTiled && mSettings.mMaxWidth == 0 && mSettings.mMaxHeight == 0 )
{
QUrl url = createRequestUrlWMS( viewExtent, pixelWidth, pixelHeight );
Expand Down

1 comment on commit abb7d2a

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m-kuhn will you revert this in master too?

Please sign in to comment.