Skip to content
Permalink
Browse files
Implement readXML for singleband color data renderer
  • Loading branch information
mhugent committed Apr 3, 2012
1 parent f1a742c commit 180263062b80a367147124cd9f7f7a6cbaf81e52
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/core/raster/qgssinglebandcolordatarenderer.cpp
@@ -33,7 +33,15 @@ QgsSingleBandColorDataRenderer::~QgsSingleBandColorDataRenderer()

QgsRasterRenderer* QgsSingleBandColorDataRenderer::create( const QDomElement& elem, QgsRasterDataProvider* provider )
{
return 0;
if ( elem.isNull() )
{
return 0;
}

int band = elem.attribute( "band", "-1" ).toInt();
QgsRasterRenderer* r = new QgsSingleBandColorDataRenderer( provider, band );
r->readXML( elem );
return r;
}

void QgsSingleBandColorDataRenderer::draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel )

0 comments on commit 1802630

Please sign in to comment.