Skip to content

Commit cfd3913

Browse files
committedOct 24, 2017
Warning debug output when doing dangerous things
1 parent 1b6088c commit cfd3913

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/providers/wms/qgswmsprovider.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,10 @@ static void _drawDebugRect( QPainter &p, const QRectF &rect, const QColor &color
611611

612612
QImage *QgsWmsProvider::draw( QgsRectangle const &viewExtent, int pixelWidth, int pixelHeight, QgsRasterBlockFeedback *feedback )
613613
{
614-
QgsDebugMsg( "Entering." );
614+
if ( QgsApplication::instance()->thread() != QThread::currentThread() )
615+
{
616+
QgsDebugMsg( "Trying to draw a WMS image on the main thread. Stop it!" );
617+
}
615618

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

0 commit comments

Comments
 (0)
Please sign in to comment.