[Qgis-developer] Prevent delete selected features
Matthias Kuhn
matthias at opengis.ch
Mon Jun 15 06:36:52 PDT 2015
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
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150615/7a742d6f/attachment-0001.html>
More information about the Qgis-developer
mailing list