[Qgis-developer] qgis 2.2 to 2.4: problem with map legend and map view refresh!

Stefano Masera stefano.masera at arpa.piemonte.it
Mon Sep 15 05:18:26 PDT 2014


Hi list, 
I have a problem with my plugin OpeNoise with Qgis 2.4 
In the plugin I change the symbology of a layer with these final lines in a script: 

layer.setRendererV2(myRenderer) 


iface.legendInterface().refreshLayerSymbology(layer) 

iface.mapCanvas().refresh() 

layer.reload() 

While this works up to qgis 2.2, with qgis 2.4 it doesn't work. 
It changes the symbology in the map legend but not in the map view! 
If I refresh the map view, also with a simply zoom, also the map view turns ok! 

How can I do? 

Thanks 
Stefano 







Stefano Masera 
Arpa Piemonte - SC06 Dipartimento Provinciale di Torino 
Via Pio VII, 9 - 10135 Torino 
Tel.: 011 19680349; Fax: 011 19681441 
www.arpa.piemonte.it 

************************************************************************ 
Riservatezza/Confidentiality 

In ottemperanza al D.Lgs. n. 196 del 30/06/03 in materia di protezione 
dei dati personali, le informazioni contenute in questo messaggio sono 
strettamente riservate ed esclusivamente indirizzate al destinatario 
indicato (oppure alla persona responsabile di rimetterlo al 
destinatario). Vogliate tener presente che qualsiasi uso, riproduzione o 
divulgazione di questo messaggio sono vietati. Nel caso in aveste 
ricevuto questo messaggio per errore, vogliate cortesemente avvertire il 
mittente e distruggere il presente messaggio. 

According to italian law D.lgs. 196/2003 concerning privacy, if you are 
not the addressee (or responsible for delivery of the message to such 
person) you are hereby notified that any disclosure, reproduction, 
distribution or other dissemination or use of this communication is 
strictly prohibited. If you have received this message in error, please 
destroy it and notify us by email. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140915/1e4afb2e/attachment.html>


More information about the Qgis-developer mailing list