<div dir="ltr">Hi Matthias, <div><br></div><div>thanks for the response. </div><div><br></div><div>I'm writing a plugin and would like to be notified when vector layers get new features. As a SIGNAL from dataProvider.addFeatures doesn't exist, the plugin won't be able to handled such case. I could just suggest people to avoid writing directly to the provider if they want the plugin to work as expected, but I think QGIS could notify on those situations. </div><div><br></div><div>Do you think a (future) Pull Request is worth for handling this or better avoid dealing with the provider directly?</div><div><br></div><div>Regards,</div><div><br></div><div>Germán</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-10 1:43 GMT-05:00 Matthias Kuhn <span dir="ltr"><<a href="mailto:matthias@opengis.ch" target="_blank">matthias@opengis.ch</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Germán,<br>
<br>
I don't think there's a signal to do that.<br>
<br>
Is there a reason you have to write the the dataprovider directly rather<br>
then using the layer's methods?<br>
If you are in control of the code writing to the dataprovider and the<br>
code that should react to this, you could also produce the signalling on<br>
your side.<br>
<br>
Matthias<br>
<span class=""><br>
On 06/09/2016 11:24 PM, Germán Carrillo wrote:<br>
> Hi,<br>
><br>
> I'd like to ask you whether you know any way of being notified when a<br>
> feature is being added to a vector layer without opening and closing an<br>
> edit session, e.g., by using:<br>
><br>
> myLayer.dataProvider().addFeatures( [feature] )<br>
><br>
> Which directly writes the new feature to the provider.<br>
><br>
> When working with an edit session I can use featureAdded SIGNAL, which<br>
> gives me the feature id, but still haven't found a way of using such<br>
> SIGNAL with no edit session involved.<br>
><br>
> Regards,<br>
><br>
> Germán<br>
><br>
> --<br>
> -----------<br>
>    |\__<br>
> (:>__)(<br>
>    |/<br>
> Soluciones Geoinformáticas Libres<br>
> <a href="http://geotux.tuxfamily.org/" rel="noreferrer" target="_blank">http://geotux.tuxfamily.org/</a><br>
> <a href="http://twitter.com/GeoTux2" rel="noreferrer" target="_blank">http://twitter.com/GeoTux2</a><br>
> <a href="http://about.me/germancarrillo" rel="noreferrer" target="_blank">http://about.me/germancarrillo</a><br>
><br>
</span>> <<a href="http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo" rel="noreferrer" target="_blank">http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo</a>><br>
><br>
><br>
> _______________________________________________<br>
> Qgis-developer mailing list<br>
> <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
> List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
><br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>-----------<br></div><div>   |\__  <br>(:>__)(<br>   |/    <br>Soluciones Geoinformáticas Libres                            <br><a href="http://geotux.tuxfamily.org/" target="_blank">http://geotux.tuxfamily.org/</a><br><a href="http://twitter.com/GeoTux2" target="_blank">http://twitter.com/GeoTux2</a></div><div><a href="http://about.me/germancarrillo" target="_blank">http://about.me/germancarrillo</a><br></div><div><div><br></div><div><a href="http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo" target="_blank"><img src="http://gis.stackexchange.com/users/flair/4972.png"></a></div></div></div></div></div></div></div>
</div>