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

Set selected instance to None when switching videos/frames #1988

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sleap/gui/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1586,6 +1586,7 @@ def _get_frame_iterator(context: CommandContext):
def do_action(cls, context: CommandContext, params: dict):
frames = cls._get_frame_iterator(context)
cls._plot_if_next(context, frames)
context.state["instance"] = None


class GoPreviousLabeledFrame(GoIteratorCommand):
Expand Down Expand Up @@ -1623,6 +1624,7 @@ def go_to(context, frame_idx: int, video: Optional[Video] = None):
if video is not None:
context.state["video"] = video
context.state["frame_idx"] = frame_idx
context.state["instance"] = None


class GoLastInteractedFrame(NavCommand):
Expand Down
Loading