You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(AdornerLayer): remove dead _layoutDirty infrastructure (CS0414) (#7)
Follow-up to f703b12. The previous PR removed the unsafe _layoutDirty
gate from OnLayoutUpdated but kept the field and its surrounding plumbing
(Subscribe/Unsubscribe/OnAdornedElementLayoutUpdated + _subscribedElements
HashSet) to keep that diff minimal and reversible. CI builds with
TreatWarningsAsErrors=true, so the now-unused field trips CS0414
("The field 'AdornerLayer._layoutDirty' is assigned but its value is
never used") and blocks the if.81 publish.
This is the planned cleanup. Removes:
- _layoutDirty field (read-eliminated by the prior commit)
- _subscribedElements HashSet
- OnAdornedElementLayoutUpdated handler
- SubscribeToElementLayout / UnsubscribeFromElementLayout helpers
- All call sites that armed _layoutDirty (Add/Remove/Update/SetAdornerZOrder)
- Per-element LayoutUpdated subscription from Add/Remove
Net behavior unchanged from f703b12 - the gate was already removed,
so these write-only assignments and unread subscriptions had no
observable effect.
Co-authored-by: Claude (Initial Force WPF Bot) <wpf-bot@initialforce.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments