Re: [Qgis-developer] Labeling toolbar activating signals?
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. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Labeling toolbar activating signals?
Hi all, answering to myself, Qgis requires a beginEditCommand to activate correctly all editing tools: self.iface.setActiveLayer(labelMapLayer ) labelLayer.startEditing() self.iface.actionToggleEditing().setEnabled(True) labelLayer.beginEditCommand(labeling action) Régis -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Labeling-toolbar-activating-signals-tp5100666p5100857.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Labeling toolbar activating signals?
Well, it doesn't always work. Anyone knows why startEditing() on a layer in Python does not activate all labeling and editing buttons? -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Labeling-toolbar-activating-signals-tp5100666p5100886.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Labeling toolbar activating signals?
this might be related to this. http://hub.qgis.org/issues/6782 Cheers, Denis On 30. 01. 14 11:43, Régis Haubourg wrote: Well, it doesn't always work. Anyone knows why startEditing() on a layer in Python does not activate all labeling and editing buttons? -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Labeling-toolbar-activating-signals-tp5100666p5100886.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer