[中] 播放时每帧销毁并重建徽标控件

Open
#20 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Open windows/birdlock/app/preview.py and read FrameBadges at lines 553-609, starting with refresh() to see which signals trigger it and what each Pill/QPushButton is built from. Then trace who emits ("job","frame","analysis","phase","view") changes during playback so you know how often refresh fires and what state is available. Build the widgets once and diff a (status, manual, has_data, eye_visible, subject, view_mode, tool) signature, updating text and visibility instead of recreating; done when playing a project at 60 fps no longer emits deleteLater per frame and badges still match state.

Written by the indexing model from the issue text.

Description

位置:windows/birdlock/app/preview.py:553-609

现象:FrameBadges 在 ("job","frame","analysis","phase","view") 上刷新,refresh() 会 takeAt/hide/setParent(None)/deleteLater 所有子控件再重新创建 Pill/QPushButton。60 fps 播放时每秒创建销毁数十个 QObject,容易抖动并堆积延迟删除事件。

复现:播放任意工程并观察事件循环中的 deleteLater 与重绘。

建议:保留固定控件,按 (status, manual, has_data, eye_visible, subject, view_mode, tool) 签名比较后只更新文本与可见性。

来源:2026-11-15 全仓只读审计,PR #7 未包含此项。 未在 Windows 实机复现,复现路径由代码审计推得。

Dominant language
Swift
Stars
2
Forks
2
Avg merge
1h 11m
Merged PRs (30d)
2

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cyandee/BirdLock

All issues in cyandee/BirdLock

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.