Skip to content

Commit f3ceed4

Browse files
author
mergetest
committed
Text Designer: materialize mirrors on EnableMirrors (fixes name cover never appearing)
Mirrors are only created when their element renders (mirrorElement inside updateOne) - and name elements almost never re-render organically (names don't change), unlike health, which ticks constantly. So the factory could register the name mirror set and wait forever for a render that never came: health covers worked, name covers never materialized. EnableMirrors now forces one category-hinted render when its registry has no mirrors yet (exactly what the probe did manually), so covers exist immediately; once materialized, organic renders keep them in sync and no extra render fires.
1 parent 20f6427 commit f3ceed4

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

TextDesigner/Render.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,15 @@ function Render:EnableMirrors(frame, category, parent, color)
438438
end
439439
end
440440
syncMirrors(frame)
441+
-- MATERIALIZE: mirrors are only created when their element RENDERS
442+
-- (mirrorElement inside updateOne) — but some categories rarely re-render
443+
-- on their own (a name element only re-renders on roster/edit, unlike
444+
-- health, which ticks constantly). If this registry has no mirrors yet,
445+
-- force one category-hinted render so the covers exist immediately
446+
-- instead of waiting for an organic re-render that may never come.
447+
if next(reg.byId) == nil and DF.UpdateTextDesigner then
448+
DF:UpdateTextDesigner(frame, category)
449+
end
441450
end
442451

443452
function Render:DisableMirrors(frame, category)

0 commit comments

Comments
 (0)