Preview: promote selected layer for hit testing
Temporarily raise the selected preview item and prioritize it in the custom hit test without changing scene order. Refresh integration-test expectations for Brand logo layers and explicit thumbnail assets. WPF references: https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.panel.zindex?view=windowsdesktop-10.0 https://learn.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/hit-testing-in-the-visual-layer
This commit is contained in:
@@ -775,6 +775,22 @@ with `#Name`) + panel properties (`IsHitTestVisible/Opacity/children/actual size
|
||||
`camera 'test-camera' failed` are test noise, not DB state — to check pollution, query
|
||||
the DB directly (`python3 sqlite3`, `SELECT DeviceId FROM Webcam`), not the log.
|
||||
|
||||
## Deterministic test for a selected layer above an overlap (2026-10-28)
|
||||
|
||||
When preview rendering uses WPF z-order but dragging uses an additional custom hit-test, test both
|
||||
contracts without injecting a physical cursor: in a real `MainWindow` on the `RealApp` STA, overlap
|
||||
two scene elements, select the lower one through the layer list, assert `Panel.GetZIndex` raises its
|
||||
container, assert `window.InputHitTest(point)` resolves the selected visual, and call the same
|
||||
production hit-test method used by the drag handler to assert it chooses that selected model. Clear
|
||||
selection and assert both hit paths return the original top layer and the scene's element order is
|
||||
unchanged. WPF documents that input hit testing returns the input element at a point and that visual
|
||||
hit-test results follow z-order: <https://learn.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/hit-testing-in-the-visual-layer>.
|
||||
|
||||
Do not use `SetCursorPos`/`mouse_event` for this specific assertion: the test passed alone but was
|
||||
intermittent in the full suite, with a cursor move landing at the canvas edge (`X=1900`) rather than
|
||||
the intended offset. Physical injection remains appropriate only when the behavior under test is the
|
||||
actual OS mouse-routing/drag path (as in the layer-list reorder test).
|
||||
|
||||
## A "known failure" label without a recorded cause = a bug on life support
|
||||
|
||||
(2026-09-01, the audio triple-take) One line — `_delayedMix` (nullable, added by TASK 22,
|
||||
|
||||
Reference in New Issue
Block a user