Skip to content
Permalink
Browse files

Revert force WMS rendering in non-gui thread

Fix #17379
  • Loading branch information
m-kuhn committed Nov 29, 2017
1 parent 3d2665f commit abb7d2a19eaabee928f524f305c05795f9a8c301
Showing with 4 additions and 7 deletions.
  1. +4 −7 src/providers/wms/qgswmsprovider.cpp
@@ -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 );

1 comment on commit abb7d2a

@nyalldawson

This comment has been minimized.

Copy link
Contributor

@nyalldawson nyalldawson commented on abb7d2a Dec 5, 2017

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

Please sign in to comment.
You can’t perform that action at this time.