Collection hide leaves reference images ghosting in qt tiles #49

Open
opened 2026-09-01 11:12:05 +00:00 by ImBenji · 0 comments
Owner

Hiding a collection that holds both a reference image and segments leaves the image still drawn in the qt tile layer, even though it is gone from the scene.

_v2ComputeHideEvictRects (lib/rendering/components/qt_tiles.dart) says it handles "a pure segment/station hide-or-show", but it never actually checks that it is one. It diffs hiddenSegmentIds and hiddenStationIds and never looks at canvas objects at all — their scene-key parts are not in the _v2PartsEqualExcept comparison either. So a hide that toggles an image AND a segment together, which is every collection hide, still finds a toggled segment, takes the scoped eviction path, and evicts only that segment's rects. The image stays baked into every other tile, and _qtSceneKey has already been advanced by then, so nothing ever comes back for it.

Fix: give canvas objects the same before/after scene-key-parts treatment the line and station maps already get, plus a canvasObjectBoundingBox pass over the toggled ids to produce evict rects.

Marked KNOWN BROKEN in the source. Found while fixing the plain image-hide ghost (H on a selected image), which was a different mechanism — _evictBandPicturesForKinds reading only the post-hide band plan — and is already fixed via the _v2PrevSceneBands union.

Hiding a collection that holds both a reference image and segments leaves the image still drawn in the qt tile layer, even though it is gone from the scene. `_v2ComputeHideEvictRects` (lib/rendering/components/qt_tiles.dart) says it handles "a pure segment/station hide-or-show", but it never actually checks that it is one. It diffs `hiddenSegmentIds` and `hiddenStationIds` and never looks at canvas objects at all — their scene-key parts are not in the `_v2PartsEqualExcept` comparison either. So a hide that toggles an image AND a segment together, which is every collection hide, still finds a toggled segment, takes the scoped eviction path, and evicts only that segment's rects. The image stays baked into every other tile, and `_qtSceneKey` has already been advanced by then, so nothing ever comes back for it. Fix: give canvas objects the same before/after scene-key-parts treatment the line and station maps already get, plus a `canvasObjectBoundingBox` pass over the toggled ids to produce evict rects. Marked KNOWN BROKEN in the source. Found while fixing the plain image-hide ghost (H on a selected image), which was a different mechanism — `_evictBandPicturesForKinds` reading only the post-hide band plan — and is already fixed via the `_v2PrevSceneBands` union.
ImBenji added the bugarea:rendering labels 2026-09-01 11:12:06 +00:00
ImBenji added this to the Arcs & Angles project 2026-09-01 11:12:06 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: IMBENJI.NET/Metro-Map-Maker#49