[Qgis-developer] Raster drawing style always set to single band gray

Alexander Bruy alexander.bruy at gmail.com
Tue May 14 02:34:05 PDT 2013


Hi all,

seems something broken in raster subsystem. Method drawingStyle() of
QgsRasterLayer class always returns 1 despite which rendering style
is set via properties or qml file.

Steps to reproduce:
 1. load singleband gray raster
 2. open layer properties and in Style tab set "Render type" to
    Singleband pseudocolor
 3. add several classes and assign colors for them, apply changes
 4. close layer properties
 5. open Python console and run next code (raster layer should be
    active):

    l = iface.mapCanvas().currentLayer()
    l.drawingStyle()

This always returns value 1, but for Singleband pseudocolor it
must be 2.

Should I file ticket?

-- 
Alexander Bruy


More information about the Qgis-developer mailing list