<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi list ..<br>
</p>
<p>If I define an event listener for event geometryChanged event on
object QgsVectorLayer in the Python console like this:<br>
</p>
<p><font color="#008080"><b><font face="monospace">=====================<br>
</font></b></font></p>
<p><font color="#008080"><b><font face="monospace"># event
listener...<br>
def feedback(fid, geom):<br>
# print id and geometry wkt in the console <br>
print ('id: {}, geometry: {}'.format(fid, geom.asWkt()))<br>
<br>
# find layer<br>
layer = iface.activeLayer()<br>
</font></b></font></p>
<p><font color="#008080"><b><font face="monospace"># connect
listener to event on layer<br>
layer.geometryChanged.connect(feedback)</font></b></font></p>
<p><font color="#008080"><b><font face="monospace">======================<br>
</font></b></font></p>
<p><br>
</p>
<p>It works nicely, printing the id and the WKT of the object
changed. However, the event fires *3* times, thus printing the
same message 3 times.</p>
<p>Why does it do that ? (And no, I haven't connected it 3 times to
the same event. If I connect it twice, I'll get *6* lines in the
the console. And I did the experiment with a new user profile).</p>
Windows 10, QGIS 3.26.3<br>
<pre class="moz-signature" cols="72">
--
Med venlig hilsen / Best regards
Bo Victor Thomsen</pre>
</body>
</html>