scenerygraphics / sciview

sciview is a tool for visualization and interaction with ND image and mesh data
BSD 2-Clause "Simplified" License
66 stars 17 forks source link

Del key and add commands #492

Closed moreApi closed 1 year ago

moreApi commented 1 year ago

Controls: delete key to delete nodes

closes #473

AddCone,AddCylinder,MenuWeights: Add Cylinder and Cone menu entries

closes #487

moreApi commented 1 year ago

The cylinder looks a bit shitty because its missing lids. https://github.com/scenerygraphics/scenery/issues/556

kephale commented 1 year ago

FWIW, I would also be fine with merging this and creating an issue to track the need for deletion warning dialogs.

moreApi commented 1 year ago

I would prefer an undo option instead but that probatly requires it own hackerton^^ A warning could be quite annoing if one wants to delete many things. But the delete key also only works if the focus is on the scenery frame that is annoying anyway.

moreApi commented 1 year ago

Accidentally deleting the node you fiddled with the last hour would be the most annoing though... Therefore I vote for havig a warning.

moreApi commented 1 year ago

Do you know by heart how to display such a warning? I am not familiar with that.

moreApi commented 1 year ago

Also I did not use the delete command in the key binding. Maybe that needs also to be fixed.

kephale commented 1 year ago

Maybe try JOptionPane.showOptionDialog

kephale commented 1 year ago

IMHO it is fine to not use the DeleteObject command as well, but then the dialog could be part of deleteNode toggled by a keyword argument.

moreApi commented 1 year ago

ok so now the user has to confirm a delete if it is triggerd by a key press. And the button descriptions would make my human interaction professor proud.

@kephale if you are also happy you are free to merge.