Napari: Consistent behavior when deleting points with hotkeys

Created on 20 Apr 2020  路  2Comments  路  Source: napari/napari

馃殌 Feature

When adding points, it would be nice to be able to use the 'delete' key to delete points.

Behavior should be consistent. Current behavior when on a points layer:

  • Selecting a point and using the delete(mac) or backspace(windows), deletes the selected point.
  • If a point is selected and I click the 'Delete selected points' button (x), the selected point is deleted.

However, if I am in the adding points mode and I use the delete/backspace key, nothing happens even though the last created point is selected.

Pitch

The last created point should be deleted after pressing the delete/backspace key.

bug feature

All 2 comments

I think this is a good call, @justinelarsen . Do we want this in 0.3.0? It's a real quick one. I _think_ we just need to add Mode.ADD to line 65 below.

https://github.com/napari/napari/blob/cfd4eaf85114690161c197e920bb1574157e5671/napari/layers/points/_points_key_bindings.py#L62-L66

@kevinyamauchi i don鈥檛 think it鈥檚 urgent but if it鈥檚 a simple fix it would be great to get this in!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sofroniewn picture sofroniewn  路  3Comments

kevinyamauchi picture kevinyamauchi  路  4Comments

jni picture jni  路  3Comments

GenevieveBuckley picture GenevieveBuckley  路  3Comments

itamarst picture itamarst  路  3Comments