-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: Keyboard shortcut to delete current image and clear scene #706
Conversation
✅ Deploy Preview for volview-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Gracias.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whatever your final keybinds are, please add them to https://github.com/Kitware/VolView/blob/main/docs/mouse_controls.md.
I changed the shortcut to add modifier, and modified mouse_controls.md |
src/composables/actions.ts
Outdated
|
||
const deleteCurrentImage = () => () => { | ||
const datasetStore = useDatasetStore(); | ||
datasetStore.remove(datasetStore.primaryImageID!); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm all for updating datasetStore.remove
so that we can pass in null image IDs without checking. That way we can drop the !
operator here.
remove(id: string | null) {
if (!id) return
...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the changes
I was trying to squash some of lchauvin's commits and rebase rather than merge on main... but messed up force pushing them back on this PR =/ Guess we just use #713 |
Add a keyboard shortcut to delete the current image (ctrl+d), and clear the whole scene (ctrl+w)