Skip to content

Conversation

@gitttt-1234
Copy link
Collaborator

Summary

Fixes a bug where the status bar would display information from the previously selected video instead of the currently selected video.

Problem

When selecting a video from the video list (e.g., selecting video 27), the bottom status bar would sometimes show information from the previously selected video (e.g., video 26).

Root Cause

In updateStatusMessage() at sleap/gui/app.py:1314-1325, the index variable was never initialized before the loop that searches for the current video. If the video matching logic failed (e.g., when same_dataset was False), the index variable would:

  1. Be undefined (causing a NameError in Python), or
  2. Retain its value from a previous call to the function (causing stale info to be displayed)

Changes

  • Initialize index = None before the video search loop
  • Only display video number information if index is not None
  • This ensures the status bar always shows correct info for the selected video

Testing

  • Select different videos from the video list
  • Verify the status bar shows the correct video number and information
  • Test with projects containing multiple videos with similar filenames

🤖 Generated with Claude Code

Initialize video index before loop and only display if found.
This prevents the status bar from showing information from the
previously selected video when the matching logic fails.

Fixes issue where selecting video 27 would show info from video 26.
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.

2 participants