Selecting short clips blocks adjacent selections and misaligns labels
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
Research direction
Start in track_widgets.py at class BaseItem, then read counteract_zoom() and check how the item rectangle is used for hit testing and label layout. Make hit testing use the clip rectangle and use self.rect() for label layout; done when adjacent one-frame clips can be selected independently and labels stay within clip boundaries at different zoom levels and device pixel ratios.
Written by the indexing model from the issue text.
Description
Selecting short clips blocks adjacent selections and misaligns labels
Steps to reproduce
- Open a timeline containing consecutive one-frame clips, such as a 25 fps track.
- Zoom in until individual clips are clearly visible.
- Select a clip, then try selecting the immediately adjacent clips.
- Zoom in further with the clip still selected.
Actual behavior
- Clicking nearby clips can leave the previous clip selected.
- The selected clip’s name and source-out label appear outside its visible boundaries. Unselected clips display correctly once sufficiently enlarged.
Expected behavior
Each clip should be independently selectable, and labels should remain positioned within their own clip regardless of selection state.
Likely cause and minimal fix
BaseItem uses a cosmetic pen with width 5 when selected. The default QGraphicsRectItem.shape() and boundingRect() include this width in item coordinates, expanding the hit area across adjacent clips. counteract_zoom() also uses this inflated bounding rectangle for label layout.
A minimal fix is to ( track_widgets.py class BaseItem):
- Add the following
shape()method toBaseItemso that hit-testing uses only the clip’s actual rectangle, without including the selection border:
def shape(self):
path = QtGui.QPainterPath()
path.addRect(self.rect())
return path
- Use
self.rect()instead ofself.boundingRect()for label layout incounteract_zoom().
This resolves both issues in Qt 6.9.2 tests at multiple zoom levels and device pixel ratios of 1 and 2.
- Dominant language
- Python
- Stars
- 2
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
namespace operations
Difficulty 1/5 Under an hour Newbie friendliness 65/100
EclipseFdn/open-vsx.org#15057 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
FinanceFlash/unvibecode#349 ·
-
Mission statement: why this is free, in the README, Why This Exists and the wiki HomePossibly taken @ChiefGyk3D claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ChiefGyk3D/Clouds-Against-Humanity#348 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
vllm-project/vime#508 ·
Maintainers usually reply within 4 days