brainglobe / brainrender-napari

A napari plugin to render BrainGlobe atlases and associated data as layers.
BSD 3-Clause "New" or "Revised" License
18 stars 1 forks source link

Fix structure view crash #80

Closed alessandrofelder closed 10 months ago

alessandrofelder commented 10 months ago

Description

What is this PR

Why is this PR needed? Double-click on structure name (not acronym) causes a crash, because name is passed as a key to a dictionary with acronyms as keys.

What does this PR do? Ensures structure_view.selected_structure_acronym (renamed in this PR) always returns the acronym even when the index the users clicks on is the name.

References

Fixes #76

How has this PR been tested?

Please explain how any new code has been tested, and how you have ensured that no existing functionality has changed.

Is this a breaking change?

No

Does this PR require an update to the documentation?

No

Checklist:

codecov[bot] commented 10 months ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (fb9d764) 96.95% compared to head (52d5cdd) 96.96%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #80 +/- ## ======================================= Coverage 96.95% 96.96% ======================================= Files 7 7 Lines 328 329 +1 ======================================= + Hits 318 319 +1 Misses 10 10 ``` | [Files Changed](https://app.codecov.io/gh/brainglobe/brainrender-napari/pull/80?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=brainglobe) | Coverage Δ | | |---|---|---| | [brainrender\_napari/widgets/structure\_view.py](https://app.codecov.io/gh/brainglobe/brainrender-napari/pull/80?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=brainglobe#diff-YnJhaW5yZW5kZXJfbmFwYXJpL3dpZGdldHMvc3RydWN0dXJlX3ZpZXcucHk=) | `93.38% <100.00%> (+0.05%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.