Open fdrgsp opened 8 months ago
Attention: Patch coverage is 90.00000%
with 6 lines
in your changes are missing coverage. Please review.
Project coverage is 79.23%. Comparing base (
4c625fa
) to head (bb95a68
).
Files | Patch % | Lines |
---|---|---|
src/napari_micromanager/_gui_objects/_toolbar.py | 89.83% | 6 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
with this PR, when we save the state of the
QMainWindow
in ajson
file so that when we re-opennapari-micromanager
again the saved layout is restored.the
json
file has two keys:layout_state
: where the state of thenapari QMainWindow
is stored using thesaveState()
method (the state isbase64
encoded to be able to save it to thejson
file)pymmcore_widgets
where the names of the dockedpymmcore_widgets
are stored. The "pymmcore_widgets" key is crucial in our layout saving process. It stores the names of all active pymmcore_widgets at the time of saving. Before restoring the layout, we must recreate these widgets. If not, they won't be included in the restored layout (this is because thepymmcore-widgets
are not created at the startup but only when the user clicks on theirQPushButton
).The
json
file is saved in theappdirs.user_data_dir
path in a folder namednapari_micromanager
.This PR also adds a
ScrollableWidget
to house thepymmcore_widgets
. This allows for easy docking of widgets either above or below others, ensuring they remain within the monitor's display area and do not overflow off-screen.