[Qgis-developer] Labeling toolbar activating signals?

Régis Haubourg regis.haubourg at eau-adour-garonne.fr
Fri Jan 31 02:01:05 PST 2014


Thanks Denis, this is close but not totally related.
I finally managed to activate the buttons but this is like vaudou magic to
me:

I create a memory layer, and triggers actionToggleEditing once, and then a
second time but only after having refreshed the canvas.. :


        self.iface.setActiveLayer(labelMapLayer )
        labelLayer.startEditing()
        self.iface.actionToggleEditing().trigger()
        

       
        # connects label layer attributes values changed to
labelLayerModified function 
        labelLayer.attributeValueChanged.connect(self.labelLayerModified)
        
         #redraws registry and mapcanvas.
        if hasattr(labelMapLayer, "setCacheImage" ):
            labelMapLayer.setCacheImage(None )

        labelMapLayer.triggerRepaint()
        self.iface.legendInterface().refreshLayerSymbology( labelMapLayer )
        self.iface.actionToggleEditing().trigger()




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Labeling-toolbar-activating-signals-tp5100666p5101140.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list