Skip to content
Permalink
Browse files

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 a5db99a9a3cf6de53bfe68a33abcb87b180721a5
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/core/qgsprojectfiletransform.cpp
@@ -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() );

0 comments on commit a5db99a

Please sign in to comment.
You can’t perform that action at this time.