Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
more detailed comment about the scope of the fix
  • Loading branch information
luipir committed Oct 11, 2017
1 parent 60485ac commit b611916
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/layertree/qgslayertreemodel.cpp
Expand Up @@ -227,6 +227,10 @@ QVariant QgsLayerTreeModel::data( const QModelIndex &index, int role ) const
if ( testFlag( ShowRasterPreviewIcon ) )
{
QgsRasterLayer* rlayer = qobject_cast<QgsRasterLayer *>( layer );
// avoid to create preview for wms that imply a better multi thread management
// due to async nature of wms.
// The following two line of code is part of the fix of
// https://issues.qgis.org/issues/16803
if ( rlayer->providerType() == QLatin1String( "wms" ) )
return QgsLayerItem::iconRaster();
return QIcon( QPixmap::fromImage( rlayer->previewAsImage( QSize( 32, 32 ) ) ) );
Expand Down

0 comments on commit b611916

Please sign in to comment.