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

Add _block_refresh() to layers #6525

Merged
merged 10 commits into from Dec 18, 2023
Merged

Conversation

jamesyan-git
Copy link
Contributor

Description

As per this discussion on the graph layer PR, this PR add a context manager to block refresh() from updating the view slice.
We thought it would be best to separate this from the graph layer PR, so it isn't being snuck in within a larger PR.

Currently, this blocker is not used, however see here for how it will be used in a future PR.

Co-authored with @DragaDoncila

@github-actions github-actions bot added tests Something related to our tests qt Relates to qt labels Dec 11, 2023
Copy link

codecov bot commented Dec 11, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0312cac) 92.25% compared to head (4cf0cd7) 92.22%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6525      +/-   ##
==========================================
- Coverage   92.25%   92.22%   -0.04%     
==========================================
  Files         601      601              
  Lines       53419    53486      +67     
==========================================
+ Hits        49284    49325      +41     
- Misses       4135     4161      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DragaDoncila
Copy link
Contributor

@Czaki are you happy with the state of this PR now? It would be great to get approval from you, if you are, as I co-authored and don't want to self-approve.

@Czaki Czaki added this to the 0.5.0 milestone Dec 14, 2023
@Czaki Czaki added ready to merge Last chance for comments! Will be merged in ~24h maintenance PR with maintance changes, labels Dec 14, 2023
@DragaDoncila
Copy link
Contributor

Will merge this now so we can update #4991. Thanks @Czaki

@DragaDoncila DragaDoncila merged commit 700f423 into napari:main Dec 18, 2023
37 checks passed
kne42 added a commit to kne42/napari that referenced this pull request Dec 20, 2023
* main: (80 commits)
  Check in LabelColormap that fewer than 2**16 colors are requested (napari#6540)
  Fix label color shuffling by also updating colormap size (napari#6460)
  Add `_block_refresh()` to layers (napari#6525)
  MNT: Use `partial` in samples menu to avoid leaking  (napari#6538)
  Update performance and reduce memory usage for big Labels layer in direct color mode (napari#6439)
  Reset single step and decimals on reset range slider in popup (napari#6523)
  Add copy operator to fix memory benchmarks (napari#6530)
  Restore quit shortcut (napari#6526)
  Fix problem with invalidate cache  (napari#6520)
  [pre-commit.ci] pre-commit autoupdate (napari#6505)
  Pass key event from Main window to our internal mechanism (napari#6419)
  Typing: Fully type 5 more files (napari#6361)
  Do not use native dialog for reset shortcuts (napari#6493)
  Use views rather than CPU-based hashing for 8- and 16-bit Labels data (napari#6467)
  Add import lint back to CI (napari#6506)
  Type napari.layers.image helper sub-modules (napari#6499)
  Bugfix: ensure gamma and opacity are floats (napari#6498)
  FIX: Remove `None` default from `_remove_dock_widget` (napari#6481)
  Add testing_extra and optional dependencies when creating constraints (napari#6487)
  Run test suite with optional dependencies and fix tests when `triangle` is installed (napari#6488)
  ...
@Czaki Czaki removed the ready to merge Last chance for comments! Will be merged in ~24h label Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance PR with maintance changes, qt Relates to qt tests Something related to our tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants