0

Right now I am using:

self.iface.mapCanvas().selectionChanged.connect(FunctionThatReactsToTheSignal)

But this one sends two signals, one for the deselection of the previous feature and one for te selection of the new one, so the FunctionThatReactsToTheSignal is executed twice, is there a way to make it send just one signal for the new selection or another signal function to avoid repetitions?

  • That signal is only called once. Are you sure you are doing the connect only once? – Fran Raga May 22 at 18:27
  • yes, it is the first thing I checked, but the function is being called twice per signal. @FranRaga – Thriskel May 22 at 18:28
  • What is your version of qgis? – Fran Raga May 22 at 18:31
  • 3.4.7-Madeira @FranRaga – Thriskel May 22 at 18:33
  • mmm.. is so strange then,only called once using this version – Fran Raga May 22 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.