Skip to content

Commit

Permalink
fix(annotation): fully deleting old relationships to allow displayUnf…
Browse files Browse the repository at this point in the history
…iltered to update properly after changing a layer source from a layer that has an actively linked relationship. This prevented it from showing the spatial index for the new source until the page was refreshed.
  • Loading branch information
chrisj committed Aug 18, 2023
1 parent f29266c commit 1f5b0ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/neuroglancer/annotation/user_layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,11 @@ class LinkedSegmentationLayers extends RefCounted {
state.seenGeneration = generation;
}
if (!isLoading) {
const {relationshipStates} = this.annotationDisplayState;
for (const [relationship, state] of map) {
if (state.seenGeneration !== generation) {
map.delete(relationship);
relationshipStates.delete(relationship);
changed = true;
}
}
Expand Down

0 comments on commit 1f5b0ef

Please sign in to comment.