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

Fix creating/editing a volume task type #5532

Merged
merged 5 commits into from
Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Fixed a bug where the upload of multiple NMLs failed if some of them have an organization attribute and others don’t. [#5483](https://github.com/scalableminds/webknossos/pull/5483)
- Fixed a bug in the application of agglomerate files where the `cumsum.json` was not used correctly. [#5499](https://github.com/scalableminds/webknossos/pull/5499)
- Fixed an innocuous error toast when opening the dataset import view. [#5526](https://github.com/scalableminds/webknossos/pull/5526)
- Fixed that creating/editing a volume task type didn't allow submitting the form. [#5532](https://github.com/scalableminds/webknossos/pull/5532)

### Removed
- Removed the button to load or refresh the isosurface of the centered cell from the 3D view. Instead, this action can be triggered from the "Meshes" tab. [#5440](https://github.com/scalableminds/webknossos/pull/5440)
Expand Down
44 changes: 23 additions & 21 deletions frontend/javascripts/admin/tasktype/task_type_create_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,27 +290,29 @@ class TaskTypeCreateView extends React.PureComponent<Props, State> {
prevValues.tracingType !== curValues.tracingType
}
>
{({ getFieldValue }) =>
getFieldValue(["tracingType"]) !== "volume" ? (
<React.Fragment>
<FormItem
name={["settings", "somaClickingAllowed"]}
label="Settings"
valuePropName="checked"
>
<Checkbox>Allow Single-node-tree mode (&quot;Soma clicking&quot;)</Checkbox>
</FormItem>

<FormItem name={["settings", "branchPointsAllowed"]} valuePropName="checked">
<Checkbox>Allow Branchpoints</Checkbox>
</FormItem>

<FormItem name={["settings", "mergerMode"]} valuePropName="checked">
<Checkbox>Merger Mode</Checkbox>
</FormItem>
</React.Fragment>
) : null
}
{({ getFieldValue }) => (
<div
style={{
Copy link
Member

Choose a reason for hiding this comment

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

I'd propose to add a comment so that this doesn't happen again in the future

Copy link
Member Author

Choose a reason for hiding this comment

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

Very good point 👍

display: getFieldValue(["tracingType"]) === "volume" ? "none" : "block",
}}
>
<FormItem
name={["settings", "somaClickingAllowed"]}
label="Settings"
valuePropName="checked"
>
<Checkbox>Allow Single-node-tree mode (&quot;Soma clicking&quot;)</Checkbox>
</FormItem>

<FormItem name={["settings", "branchPointsAllowed"]} valuePropName="checked">
<Checkbox>Allow Branchpoints</Checkbox>
</FormItem>

<FormItem name={["settings", "mergerMode"]} valuePropName="checked">
<Checkbox>Merger Mode</Checkbox>
</FormItem>
</div>
)}
</FormItem>

<FormItem
Expand Down