On Fri, Aug 6, 2010 at 2:43 PM, Benoit de Cabissole <ben...@exigesa.com> wrote:
> I've tried many combinations around the following code:
>
> [...]
> 129    theLayer.rasterShader().setRasterShaderFunction(
> QgsColorRampShader() )
> 130    theLayer.setRasterShaderFunction( QgsColorRampShader() )
> 131    myColorRampShader = QgsColorRampShader()
> 132    myColorRampShader.setColorRampItemList( theTBL )
> 133    myColorRampShader.setMaximumColorCacheSize( nColo )
> 134    myColorRampShader.setColorRampType( myColorRampShader.DISCRETE )
> 135    theLayer.rasterShader().setRasterShaderFunction( myColorRampShader )
> 136    theLayer.setRasterShaderFunction( myColorRampShader )

Hi Benoit,

I've took a look at the problem at it turned out there were actually
two problems with python wrappers. I've fixed that in svn - r14022.
>From that revision, things should werk correctly. You should be able
to either:
- create an instance of shader function and assign it to raster layer
without a crash
- retrieve current raster shader function and modify it (previously
always the base class QgsRasterShaderFunction was returned)

Regards
Martin
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to