Skip to content

Commit

Permalink
Fix animation modal color layer validation (#7882)
Browse files Browse the repository at this point in the history
* fix animation modal color layer validation

* changelog

* rename variable

* apply pr feedback

* improve error message of uint24 layers in animation modal

---------

Co-authored-by: Michael Büßemeyer <michael.buessemeyer@student.hpi.de>
  • Loading branch information
hotzenklotz and MichaelBuessemeyer committed Jun 14, 2024
1 parent 7b95132 commit f86b4f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Fixed a bug where brushing on a fallback segmentation with active mapping and with segment index file would lead to failed saves. [#7833](https://github.com/scalableminds/webknossos/pull/7833)
- Fixed a bug where sometimes old mismatching javascript code would be served after upgrades. [#7854](https://github.com/scalableminds/webknossos/pull/7854)
- Fixed a bug where dataset uploads of zipped tiff data via the UI would be rejected. [#7856](https://github.com/scalableminds/webknossos/pull/7856)
- Fixed a bug with incorrect valiation of layer names in the animation modal. [#7882](https://github.com/scalableminds/webknossos/pull/7882)

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function CreateAnimationModal(props: Props) {

const isDtypeSupported = colorLayer.elementClass !== "uint24";
if (!isDtypeSupported)
errorMessages.push("Sorry, animations are not supported for uInt24 datasets.");
errorMessages.push("Sorry, animations are not supported for uInt24 color layers.");

const isDataset3D =
!is2dDataset(state.dataset) && (colorLayer.additionalAxes?.length || 0) === 0;
Expand Down Expand Up @@ -230,7 +230,7 @@ function CreateAnimationModal(props: Props) {
cameraPosition: selectedCameraPosition,
};

if (!validateAnimationOptions(colorLayer, boundingBox, meshes)) return;
if (!validateAnimationOptions(selectedColorLayer, boundingBox, meshes)) return;

startRenderAnimationJob(state.dataset.owningOrganization, state.dataset.name, animationOptions);

Expand Down Expand Up @@ -395,7 +395,7 @@ function CreateAnimationModal(props: Props) {
<Row gutter={[8, 20]}>
<Alert
type="error"
style={{ marginTop: 18 }}
style={{ marginTop: 18, width: "100%" }}
message={
<ul>
{validationErrors.map((errorMessage) => (
Expand Down

0 comments on commit f86b4f0

Please sign in to comment.