Auto layouts: clean up orphaned legacy text overrides after Text Designer migration#139
Open
Krathe82 wants to merge 1 commit into
Open
Auto layouts: clean up orphaned legacy text overrides after Text Designer migration#139Krathe82 wants to merge 1 commit into
Krathe82 wants to merge 1 commit into
Conversation
A raid auto-layout edited before the Text Designer migration could keep the built-in Name/Health/Status text settings (nameFontSize, healthFontSize, statusText*, …) as overrides. TD now owns that text (the legacy FontStrings are hidden), so those overrides are inert — they only clutter the override list beside the layout's textDesignerPreset. DF:CleanupLegacyTextLayoutOverrides (AutoProfiles.lua) strips override keys categorised as Name/Health/Status Text from every raid auto-layout, reusing GetOverrideTabId so the textDesigner(Preset) entry is preserved. Gated on the raid TD's migratedFromLegacy so it NEVER runs until the legacy values are safely in Text Designer; per-profile guard, idempotent. Called right after MigrateTextDesignerFromLegacy at login (Core.lua) and on profile switch (Profile.lua). Stripping is visually inert — TD ignores these keys.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Text Designer migration took over the built-in Name / Health / Status text. A raid auto-layout that was edited before that migration can still carry those legacy text settings (
nameFontSize,healthFontSize,statusText*, …) as per-layout overrides. They're now inert —IsLegacyTextHiddenhides the legacy FontStrings — so they only clutter the override list (/df overrides, the override-details panel) without doing anything.Fix
DF:CleanupLegacyTextLayoutOverridesstrips override keys categorised as Name / Health / Status Text from every raid auto-layout, reusing the existingGetOverrideTabIdso the Text Designer entry itself is preserved.Gated for safety: it only runs once the raid Text Designer has actually migrated the legacy settings (
migratedFromLegacy), so the values are preserved in Text Designer first and it never strips while the legacy text is still live. Per-profile guard, idempotent; called right after the legacy migration at login and on profile switch. Stripping is visually inert — Text Designer ignores these keys — so it only declutters.