[Bugfix] UIFrame: Child appearance changes don't invalidate parent's cached texture #225
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:procgen
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
john/McRogueFace#225
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
When a Frame uses
clip_children=Trueorcache_subtree=True, children are rendered to a RenderTexture. However, changes to child properties (color, text, sprite index, etc.) don't reliably invalidate the parent's cached texture.Root Cause
The dirty propagation in
UIDrawable::markContentDirty()(lines 909-919) has issues:Issues
Early return: If
render_dirtyis already true, propagation stops. Parent may not be notified.Weak pointer expiration: If
parent.lock()returns nullptr (weak_ptr expired), propagation fails silently.No propagation for some setters: Not all property setters call
markDirty(). Some callmarkCompositeDirty()which only propagates position changes, not content changes.Symptoms
Until something else triggers a full redraw.
Proposed Fix
markContentDirty()