Closed psobolewskiPhD closed 2 months ago
Attention: Patch coverage is 88.88889%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 86.08%. Comparing base (
ba8ab53
) to head (d1a07a0
). Report is 2 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
napari_animation/_qt/animation_widget.py | 83.33% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Superseded by #234 - thanks for delving though!
Closes: https://github.com/napari/napari-animation/issues/231
So in https://github.com/napari/napari/pull/7150 event handling order was changed in napari. This is making the key frame list manipulations for inserting a replacement frame not work correctly when the list change event callbacks trigger. I tried passing
position='first'
in the.connect()
in various places and could not get it to resolve properly -- it's events of the SelectableEventedList, which are on the napari side I think.I also tried to keep the name of the frame when
insert=False
, but the hash is still different so selection still fails.In this PR I work around all this event stuff by removing the
insert
kwarg oncapture_frame
and no longer edit the frame in-place when replacing. Instead, the new frame is added and previous is removed. Note that the frame number was already incrementing even when replacing a frame (insert=False) and because one can re-order frames, the numbers lose meaning.