Skip to content

Commit

Permalink
Fix neuron non-interactivity after undo operation
Browse files Browse the repository at this point in the history
- Undoing a change to a neuron renders it non-interactive. Updating a neuron via the TiledMicroscopeRestClient returns a TmNeuronMetadata object where the annotations have a null neuron Id. This causes the vertex hover action to subsequently fail. Fixed by reinitializing the annotation neuron Ids during update.
  • Loading branch information
carshadi committed Jul 31, 2023
1 parent 430d670 commit c2fee44
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ public TmNeuronMetadata updateNeuron(TmNeuronMetadata neuronMetadata) throws Exc
throw new IllegalStateException("Attempt to update neuron which does not have a GUID");
}
TmNeuronMetadata savedMetadata = client.updateNeuron(neuronMetadata);
// Fix null neuronId of annotations
savedMetadata.initNeuronData();
// We assume that the neuron data was saved on the server, but it only returns metadata for efficiency. We
// already have the data, so let's copy it over into the new object.
// exchanger.copyNeuronData(neuronMetadata, savedMetadata);
Expand Down

0 comments on commit c2fee44

Please sign in to comment.