Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make w shortcut non-looping #5865

Merged
merged 2 commits into from
Nov 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
### Changed
- The docker setup has been restructured, which requires changes to existing docker-compose setups. See the migration guide for details. [#5843](https://github.com/scalableminds/webknossos/pull/5843)
- By default, if data is missing in one magnification, higher magnifications are used for rendering. This setting can be controlled via the left sidebar under "Render Missing Data Black". [#5862](https://github.com/scalableminds/webknossos/pull/5862)
- Made the `w` shortcut to cycle through the tools non-looping. [#5865](https://github.com/scalableminds/webknossos/pull/5865)

### Fixed
- Fixed a bug that the displayed value range of a histogram of a color layer wasn't applied until the slider was dragged a bit. [#5853](https://github.com/scalableminds/webknossos/pull/5853)
- Fixed a bug where admins could not share annotations with teams they were not explicitly a member of. [#5845](https://github.com/scalableminds/webknossos/pull/5845)

### Removed
-
- Removed `1` shortcut which allowed to cycle through the tools but only if some of the tools were active. Use `w` instead. [#5865](https://github.com/scalableminds/webknossos/pull/5865)

### Breaking Change
-
2 changes: 1 addition & 1 deletion docs/keyboard_shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Note that you can enable *Classic Controls* which will behave slightly different
| CTRL + SHIFT + Left Mouse Drag | Remove Voxels From Cell |
| Alt + Mouse Move | Move |
| C | Create New Cell |
| W, 1 | Toggle Modes (Move / Trace / Brush) |
| W | Toggle Modes (Move / Skeleton / Trace / Brush / ...) |
| SHIFT + Mousewheel or SHIFT + I, O | Change Brush Size (Brush Mode) |
| V | Copy Segmentation of Current Cell From Previous Slice |
| SHIFT + V | Copy Segmentation of Current Cell From Next Slice |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ class VolumeKeybindings {
static getKeyboardControls() {
return {
c: () => Store.dispatch(createCellAction()),
"1": cycleTools,
v: () => {
Store.dispatch(copySegmentationLayerAction());
},
Expand Down Expand Up @@ -378,7 +377,6 @@ class PlaneController extends React.PureComponent<Props> {
h: () => this.changeMoveValue(25),
g: () => this.changeMoveValue(-25),

w: cycleTools,
...loopedKeyboardControls,
},
{
Expand Down Expand Up @@ -427,16 +425,17 @@ class PlaneController extends React.PureComponent<Props> {
}
},
q: downloadScreenshot,
w: cycleTools,
};

// TODO: Find a nicer way to express this, while satisfying flow
const emptyDefaultHandler = { c: null, "1": null };
const { c: skeletonCHandler, "1": skeletonOneHandler, ...skeletonControls } =
const emptyDefaultHandler = { c: null };
const { c: skeletonCHandler, ...skeletonControls } =
this.props.tracing.skeleton != null
? SkeletonKeybindings.getKeyboardControls()
: emptyDefaultHandler;

const { c: volumeCHandler, "1": volumeOneHandler, ...volumeControls } =
const { c: volumeCHandler, ...volumeControls } =
this.props.tracing.volume != null
? VolumeKeybindings.getKeyboardControls()
: emptyDefaultHandler;
Expand All @@ -455,7 +454,6 @@ class PlaneController extends React.PureComponent<Props> {
volumeCHandler,
boundingBoxCHandler,
),
"1": this.createToolDependentKeyboardHandler(skeletonOneHandler, volumeOneHandler),
};
}

Expand Down