-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Warn user when using precomputed meshes after brushing (#8218)
* Add key in volumetracing to store if volume bucket data has changed * show warning in context menu for loading precomputed meshes when bucket data has changed * avoid unnecessary rerenders in context menu * ensure SET_VOLUME_BUCKET_DATA_HAS_CHANGED is dispatched when buckets are changed * add missing file * fix linting * rename load_mesh_menu_item_label file * use action creator instead of hardcoding action * fix that volumeBucketDataHashChanged was not handled when the server sent it * add comments * update snapshots * add changelog entry * remove unintentional changelog entry * change action property from layerName to tracingId --------- Co-authored-by: Philipp Otto <[email protected]> Co-authored-by: Philipp Otto <[email protected]> Co-authored-by: Michael Büßemeyer <[email protected]>
- Loading branch information
1 parent
fb1f275
commit c3729ea
Showing
17 changed files
with
140 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...tend/javascripts/oxalis/view/right-border-tabs/segments_tab/load_mesh_menu_item_label.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { WarningOutlined } from "@ant-design/icons"; | ||
import FastTooltip from "components/fast_tooltip"; | ||
import type { VolumeTracing } from "oxalis/store"; | ||
import type { APIMeshFile } from "types/api_flow_types"; | ||
|
||
type Props = { | ||
currentMeshFile: APIMeshFile | null | undefined; | ||
volumeTracing: VolumeTracing | null | undefined; | ||
}; | ||
|
||
export function LoadMeshMenuItemLabel({ currentMeshFile, volumeTracing }: Props) { | ||
const showWarning = | ||
volumeTracing?.volumeBucketDataHasChanged ?? | ||
// For older annotations, volumeBucketDataHasChanged can be undefined. | ||
// In that case, we still want to show a warning if no proofreading was | ||
// done, but the mapping is still locked (i.e., the user brushed). | ||
(!volumeTracing?.hasEditableMapping && volumeTracing?.mappingIsLocked); | ||
|
||
return ( | ||
<span style={{ display: "flex", alignItems: "center", gap: "4px" }}> | ||
<FastTooltip | ||
title={ | ||
currentMeshFile != null | ||
? `Load mesh for centered segment from file ${currentMeshFile.meshFileName}` | ||
: "There is no mesh file." | ||
} | ||
> | ||
<span>Load Mesh (precomputed)</span> | ||
</FastTooltip> | ||
{showWarning && ( | ||
<FastTooltip title="Warning: The segmentation data has changed since the mesh file was created. The mesh may not match the current data."> | ||
<WarningOutlined style={{ color: "var(--ant-color-warning)" }} /> | ||
</FastTooltip> | ||
)} | ||
</span> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+34 Bytes
(100%)
...est/snapshots/public-test/test-bundle/test/backend-snapshot-tests/annotations.e2e.js.snap
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.