talmolab / sleap

A deep learning framework for multi-animal pose tracking.
https://sleap.ai
Other
435 stars 97 forks source link

New bounding box around instances prevents panning #1372

Closed olinesn closed 1 year ago

olinesn commented 1 year ago

Bug description

Expected behaviour

Clicking and dragging inside the bounding box allows the user to pan the image, just like clicking and dragging outside the bounding box.

Actual behaviour

Clicking and dragging inside the bounding box has no effect, and then upon releasing the click, all red nodes turn green. This creates two problems: 1) the panning doesn't work as expected, and 2) It becomes more difficult to keep track of which nodes I've mentally 'signed off' on and which ones I still need to check.

Your personal set up

Dell Alienware R13 Intel i7 12700KF nVidia RTX 2070 Super 64 GB RAM

Environment packages ``` # paste output of `pip freeze` or `conda list` here ```
Logs ``` # paste relevant logs here, if any ```

Screenshots

Video attached to demonstrate the unexpected behavior. https://github.com/talmolab/sleap/assets/69451171/0d2345ad-95f5-4926-8f0d-68d7920bd05a

How to reproduce

  1. Load up a SLEAP project with some predictions already inferred
  2. Scroll in to zoom close to the skeleton
  3. Double-click a node on the inferred instance to edit a node position
  4. Click and drag inside the new bounding box
  5. See error
talmo commented 1 year ago

A good place to start here will be to check if we're catching clicks on the background of instance bounding boxes in our new VisibleBoundingBox class implemented in #1133.

Specifically, I'd check if we're catching the click here:

https://github.com/talmolab/sleap/blob/19cd2b59b8ed7879c0b7d1e17181a46da3b5d153/sleap/gui/widgets/video.py#L2140-L2161

If so, we need to pass it back down the Qt GraphicsScene stack so it can be handled by the background to do a panning event.

Maybe a future enhancement could add a hotkey modifier (e.g., Ctrl?) where if it's held down, the instance is selected instead.

roomrys commented 1 year ago

This should be addressed in SLEAP 1.3.2.