-
Notifications
You must be signed in to change notification settings - Fork 98
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
Set selected instance to None when switching videos/frames #1988
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## liezl/add-gui-elements-for-sessions #1988 +/- ##
=======================================================================
- Coverage 74.18% 74.17% -0.01%
=======================================================================
Files 135 135
Lines 25438 25440 +2
=======================================================================
- Hits 18872 18871 -1
- Misses 6566 6569 +3 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move self.state["instance"]
logic into the classes that are being executed.
sleap/gui/commands.py
Outdated
@@ -363,10 +363,12 @@ def exportFullPackage(self): | |||
def previousLabeledFrame(self): | |||
"""Goes to labeled frame prior to current frame.""" | |||
self.execute(GoPreviousLabeledFrame) | |||
self.state["instance"] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want this logic to go inside the class that is being executed (i.e. GoPreviousLabeledFrame
).
self.state["instance"] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better, but I think we can simplify this further. Notice how all classes-of-interest subclass either NavCommand
or GoIteratorCommand
. Therefore, we should be able to move the context.state["instance"]
logic inside those classes to cover all cases.
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
After some manual testing, we realize that there are a few places in the GUI where we switch frames not through the This PR is superseded by: |
Description
Sets selected instance to None when switching videos/frames
Types of changes
Does this address any currently open issues?
[list open issues here]
Outside contributors checklist
Thank you for contributing to SLEAP!
❤️