Ignore a feature with featureIdentified with Pyqgis

by SilvaEd   Last Updated August 14, 2019 14:22 PM

I am using the QgsMapToolEmitPoint and QgsMapToolIdentifyFeature classes in my Qgis project.

I created the variable:

self.pointTool = QgsMapToolEmitPoint (self.canvas)

And I created a variable:

self.linetool = QgsMapToolIdentifyFeature (self.canvas)

The first variable connects to a function that generates lines in a layer. Next, I call the second function, which identifies the end point of the lines where I click.

My problem is, after making a line, calling the second function:

self.pointTool.canvasClicked.connect (self.criar_line)
self.linetool.featureIdentified.connect (self.identify)

this function captures the end point of the line created earlier, but I don't want that. I want to choose the line I want to capture the endpoint.

who can help me?

Tags : pyqgis


Related Questions