Skip to content
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

Closed
wants to merge 0 commits into from

Conversation

lchauvin
Copy link
Contributor

Add a keyboard shortcut to delete the current image (ctrl+d), and clear the whole scene (ctrl+w)

Copy link

netlify bot commented Feb 21, 2025

Deploy Preview for volview-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 55f993a
🔍 Latest deploy log https://app.netlify.com/sites/volview-dev/deploys/67c9eb3a15265f0008bf75d0
😎 Deploy Preview https://deploy-preview-706--volview-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@PaulHax PaulHax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Gracias.

@PaulHax PaulHax requested a review from floryst February 24, 2025 14:32
Copy link
Collaborator

@floryst floryst left a 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.

@lchauvin
Copy link
Contributor Author

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

@PaulHax PaulHax requested a review from floryst February 27, 2025 17:59

const deleteCurrentImage = () => () => {
const datasetStore = useDatasetStore();
datasetStore.remove(datasetStore.primaryImageID!);
Copy link
Collaborator

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
  ...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the changes

@PaulHax
Copy link
Collaborator

PaulHax commented Mar 6, 2025

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants