Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Do not paint WMS preview images. Because it crashes.
- Loading branch information
Showing
with
7 additions
and
2 deletions.
-
+7
−2
src/providers/wms/qgswmsprovider.cpp
|
@@ -615,11 +615,16 @@ 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." ); |
|
|
QImage* image = new QImage( pixelWidth, pixelHeight, QImage::Format_ARGB32 ); |
|
|
|
|
|
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. |
|
|
|
|
|
QImage* image = new QImage( pixelWidth, pixelHeight, QImage::Format_ARGB32 ); |
|
|
image->fill( 0 ); |
|
|
|
|
|
if ( !mSettings.mTiled && mSettings.mMaxWidth == 0 && mSettings.mMaxHeight == 0 ) |
|
|