Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: fix broken "show selected" in the Labels layer (because of caching) #5841

Merged
merged 3 commits into from
May 25, 2023

Conversation

ksofiyuk
Copy link
Contributor

Description

The labels caching from #5732 broke the "show selected" feature because of caching. This PR fixes it by invalidating the cache when "show selected" is activated.

I also added a test that catches this bug.

Type of change

  • Bug-fix (non-breaking change which fixes an issue)

How has this been tested?

  • all tests pass with my change

Final checklist:

  • My PR is the minimum possible work for the desired functionality
  • I have added tests that prove my fix is effective or that my feature works

@github-actions github-actions bot added the tests Something related to our tests label May 17, 2023
@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Merging #5841 (dec9c27) into main (0dfb37b) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #5841      +/-   ##
==========================================
- Coverage   89.96%   89.94%   -0.03%     
==========================================
  Files         615      615              
  Lines       52638    52654      +16     
==========================================
+ Hits        47358    47359       +1     
- Misses       5280     5295      +15     
Impacted Files Coverage Δ
napari/layers/labels/_tests/test_labels.py 99.52% <100.00%> (+<0.01%) ⬆️
napari/layers/labels/labels.py 95.87% <100.00%> (+0.01%) ⬆️

... and 6 files with indirect coverage changes

@brisvag brisvag added the bugfix PR with bugfix label May 17, 2023
@brisvag
Copy link
Contributor

brisvag commented May 17, 2023

Nice, thanks for adding the test as well 💪

@jni jni added this to the 0.4.18 milestone May 24, 2023
@jni jni added the ready to merge Last chance for comments! Will be merged in ~24h label May 24, 2023
@jni jni merged commit 5264df9 into napari:main May 25, 2023
32 of 34 checks passed
@jni
Copy link
Member

jni commented May 25, 2023

Thanks @ksofiyuk 🙏

@jni jni removed the ready to merge Last chance for comments! Will be merged in ~24h label May 25, 2023
@Czaki Czaki mentioned this pull request Jun 7, 2023
Czaki pushed a commit that referenced this pull request Jun 19, 2023
…ching) (#5841)

# Description

The labels caching from #5732 broke the "show selected" feature because
of caching. This PR fixes it by invalidating the cache when "show
selected" is activated.

I also added a test that catches this bug.
Czaki pushed a commit that referenced this pull request Jun 21, 2023
…ching) (#5841)

# Description

The labels caching from #5732 broke the "show selected" feature because
of caching. This PR fixes it by invalidating the cache when "show
selected" is activated.

I also added a test that catches this bug.
Czaki pushed a commit that referenced this pull request Jun 21, 2023
…ching) (#5841)

# Description

The labels caching from #5732 broke the "show selected" feature because
of caching. This PR fixes it by invalidating the cache when "show
selected" is activated.

I also added a test that catches this bug.
Czaki pushed a commit that referenced this pull request Jun 21, 2023
…ching) (#5841)

# Description

The labels caching from #5732 broke the "show selected" feature because
of caching. This PR fixes it by invalidating the cache when "show
selected" is activated.

I also added a test that catches this bug.
@ksofiyuk ksofiyuk deleted the bugfix_invalidate_selected_label branch January 8, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix PR with bugfix tests Something related to our tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants