You can try to connect to the QgsVectorLayer::featureDeleted signal and
automatically trigger an undo.

If you have a database in the background I would rather opt to set
proper user permissions there

Matthias

On 06/15/2015 02:42 PM, Enrico Fiore wrote:
> Hi,
> I need to avoid features deletion in some layers both from button and
> from keyboard.
>
> How can I perform this in pyqgis?
>
> I have disabled the button with these comand:
>     iface.actionDeleteSelected().setDisabled(True)
>
> but the features can be deleted with the backspace or Del.
>
> Enrico
>
>
>
>
>
>
> _______________________________________________
> Qgis-developer mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to