Skip to content
Permalink
Browse files
fix #3343
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14929 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Dec 16, 2010
1 parent 0a099b5 commit e2df47357d5d7a88a01c09034052c6729fea1cfd
Showing with 19 additions and 3 deletions.
  1. +12 −3 src/core/raster/qgsrasterlayer.cpp
  2. +7 −0 src/providers/wms/qgswmsprovider.cpp
@@ -3250,11 +3250,16 @@ void QgsRasterLayer::setDataProvider( QString const & provider,
QgsDebugMsg( "Instantiated the data provider plugin" +
QString( " with layer list of " ) + layers.join( ", " ) + " and style list of " + styles.join( ", " ) +
" and format of " + format + " and CRS of " + crs );
if ( mDataProvider->isValid() )
{
mValid = true;
mValid = mDataProvider->isValid();

if ( mValid )
{
mDataProvider->addLayers( layers, styles );
mValid = mDataProvider->isValid();
}

if ( mValid )
{
mDataProvider->setImageEncoding( format );
mDataProvider->setImageCrs( crs );

@@ -3287,6 +3292,10 @@ void QgsRasterLayer::setDataProvider( QString const & provider,
*mCRS = QgsCoordinateReferenceSystem( mDataProvider->crs() );
}
}
else
{
QgsLogger::warning( "QgsRasterLayer::setDataProvider: invalid layer" );
}
}
else
{
@@ -291,6 +291,13 @@ void QgsWmsProvider::addLayers( QStringList const &layers,
QgsDebugMsg( "Entering with layer list of " + layers.join( ", " )
+ " and style list of " + styles.join( ", " ) );

if ( layers.size() != styles.size() )
{
QgsDebugMsg( "number of layers and styles don't match" );
valid = false;
return;
}

// TODO: Make activeSubLayers a std::map in order to avoid duplicates
activeSubLayers += layers;
activeSubStyles += styles;

0 comments on commit e2df473

Please sign in to comment.