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: make Scene Management widget closable (settings persist) #67

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

psobolewskiPhD
Copy link
Collaborator

This PR aims to fix #66
When a multi-scene file is loaded, two widgets are created.
One has two checkboxes, the other has the scenes to load.
The status of the first widget (the checkboxes) is checked when the scenes are to be loaded. As a result, if that widget is closed an error is raised.

In this PR, the first widget instead sets global variables, so it need not be open.
If the settings are applied, then the widget can be closed and scenes can be loaded.
(this permits more vertical space for scene selection, particularly on smaller screens—like mine!)
Additionally, the previous values are persisted thanks to magicgui.

@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2022

Codecov Report

Base: 87.68% // Head: 87.29% // Decreases project coverage by -0.39% ⚠️

Coverage data is based on head (be80320) compared to base (3898b66).
Patch coverage: 83.33% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #67      +/-   ##
==========================================
- Coverage   87.68%   87.29%   -0.40%     
==========================================
  Files           4        3       -1     
  Lines         203      181      -22     
==========================================
- Hits          178      158      -20     
+ Misses         25       23       -2     
Impacted Files Coverage Δ
napari_aicsimageio/core.py 83.60% <83.33%> (-2.22%) ⬇️
napari_aicsimageio/__init__.py

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@evamaxfield
Copy link
Collaborator

To clarify. This PR should go in after the other merges correct? They are sort of tied together? Or is this a bug that currently exists?

@psobolewskiPhD
Copy link
Collaborator Author

psobolewskiPhD commented Nov 15, 2022

This is just a fix for the bug/issue with the two-widget solution to multiscene files.
Multiscene files open 2 widgets, with the scene selector needing values from the Scene Management widget. If that one is closed and a scene is selected from the selector widget, then the error is emitted.

It has nothing to do with the new settings widget. I guess I can see how it can be confusing...

Edit: note: I'm not sure this is the best or most pythonic fix. It's just a fix 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KeyError if the Scene Management widget is closed before scenes are selected
3 participants