Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
to open raster layer properly, more data must be read from project fi…
…le, temporary fix to get old WMS layers working
  • Loading branch information
blazek committed Jun 14, 2012
1 parent a0fc0c6 commit a5db99a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/qgsprojectfiletransform.cpp
Expand Up @@ -469,8 +469,10 @@ void QgsProjectFileTransform::transform1800to1900()
QDomNode layerNode = rasterPropertiesElem.parentNode();
QDomElement dataSourceElem = layerNode.firstChildElement( "datasource" );
QDomElement layerNameElem = layerNode.firstChildElement( "layername" );
QDomElement layerProviderElem = layerNode.firstChildElement( "provider" );
QgsRasterLayer rasterLayer( QgsProject::instance()->readPath( dataSourceElem.text() ), layerNameElem.text(), layerProviderElem.isNull() ? "gdal" : layerProviderElem.text() );
QgsRasterLayer rasterLayer;
// TODO: We have to use more data from project file to read the layer it correctly,
// OTOH, we should not read it until it was converted
rasterLayer.readXML( layerNode );
convertRasterProperties( mDom, layerNode, rasterPropertiesElem, &rasterLayer );
}
QgsDebugMsg( mDom.toString() );
Expand Down

0 comments on commit a5db99a

Please sign in to comment.