<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
Thans barry for the information about the r. addition.<br>
Now the rendering is ok, but qgis crashes :<br>
- when I try to change the property manually<br>
- when I quit qgis (from the file menu or by clicking on the cross.<br>
It seems the python bindings do not interact well with C code here ?<br>
<br>
My code :<br>
vlayer =
QgsVectorLayer(os.path.join(chemin,nom_court+".shp"), nom_court, "ogr")<br>
if vlayer.isValid():<br>
#print "Layer loaded."<br>
#Style de la couche<br>
r=QgsContinuousColorRenderer(vlayer.vectorType())<br>
r.smin=QgsSymbol(vlayer.vectorType(),
"0","","")<br>
r.smax=QgsSymbol(vlayer.vectorType(),
max_debdroit, "","")<br>
r.smin.setPen(QPen(Qt.green, 1.0))<br>
r.smax.setPen(QPen(Qt.red, 1.0))<br>
r.setMinimumSymbol(r.smin)<br>
r.setMaximumSymbol(r.smax)<br>
#champ de classification<br>
r.setClassificationField(4)<br>
#on applique le style<br>
vlayer.setRenderer(r)<br>
<br>
#on ajoute la couche dans qgis<br>
QgsMapLayerRegistry.instance().addMapLayer(vlayer)<br>
<br>
<br>
<blockquote
cite="mid:e8e7199c0711271504g487d0b95kafbb3f1cc64de598@mail.gmail.com"
type="cite">
<pre wrap=""><!---->
You're right, Barry!
Now it should be fixed in r7675 for all renderers.
Greetings
Martin
</pre>
</blockquote>
</body>
</html>