Skip to content

Fix layer moves and video frame fallback - #706

Merged
aalex merged 5 commits into
devfrom
fix-design-audit
Dec 4, 2026
Merged

aalex merged 5 commits into
devfrom
fix-design-audit

Conversation

@aalex

@aalex aalex commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Changes

  • Reject invalid layer destinations in the project and propagate failure to MCP. Validate a complete reorder before changing any layer or depth.
  • Upload the current frame through the RGB path when a YUV texture upload fails. The regression test first paints a black frame, forces the next YUV upload to fail, and checks the colours of the texture.
  • Apply moves and undo in the project model. The tree listens for the resulting row move, retains persistent indexes for child rows, and uses named roles for solo and lock. Dragging below the final row now moves the layer to the bottom.

Verification

Each commit built on macOS arm64 and passed the Qt suite with the offscreen platform. At the branch tip, Qt reported 654 passes, 0 failures and 62 skips. The new video regression also ran with a native desktop OpenGL context. It failed on the original code (the red quadrant was black) and passed with the fix.

The separate Python converter suite reported 22 passes and one failure. The same beta.1 reference-file mismatch reproduces on the base commit 34df076: the converter writes ColorLayer and its fixture expects TextureLayer.

Visibility measurements

On macOS arm64 with Qt 6.11.1, a release build drew overlapping quads using one shared source, all layers visible and solo off. The output editor repainted every 16 ms. Temporary instrumentation counted visibility inspections and timed each paint without synchronizing the GPU. A second build path skipped the solo search using the known state of this scene. Each timing below is a median of more than 450 paints after warm-up in a 955 × 350 viewport.

Layers Inspections per paint Current draw Draw with solo search bypassed
10 100 0.623 ms 0.613 ms
50 2,500 1.469 ms 1.509 ms
100 10,000 2.615 ms 2.605 ms

In a second run with the order reversed, the 100-layer pair used the same viewport and measured 2.702 ms and 2.618 ms respectively. The smaller scenes in that repeat used different viewport heights and are excluded from the comparison. The measurements confirm quadratic growth in inspections, with less than 0.1 ms between the 100-layer medians in both pairs on this machine. The PR keeps the existing visibility calculation.

A native main-window smoke test moved the middle layer to the top, undid and redid it, and attempted an invalid move. After each step the selected tree row and its layer id agreed with the project. The screenshot in the conversation shows the final selection.

@aalex aalex added this to the 1.0 milestone Dec 4, 2026
@aalex aalex self-assigned this Dec 4, 2026
@aalex
aalex requested a review from sofian December 4, 2026 16:23
@aalex

aalex commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

After moving Wall to the top, undoing the move and redoing it, Wall is selected in the first row. The inspector remains on the same layer.

move-layer

@aalex
aalex merged commit 94f9630 into dev Dec 4, 2026
3 checks passed
@aalex
aalex deleted the fix-design-audit branch December 4, 2026 16:54
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