Repository navigation
purge: keep text styles used by multileader and table styles - #2129
Merged
HakanSeven12 merged 1 commit intoOct 25, 2026
Merged
Conversation
A multileader, its style and a table style name their text style by handle (a table style also by name), so PURGE deleted a style only they used and left them pointing at nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Follow-up to #2123. PURGE All deletes a text style that is used only by a multileader, a multileader style or a table style. These name their text style by handle (a table style also by name), and the purge scan did not look at them. After the purge they point at nothing.
Recipe: a drawing with text style
T1used only by a multileader style (and a multileader in that style). PURGE All, save. In AutoCADT1is gone, and both the multileader style and the multileader (and its MTEXT) report a null text style.Fix
styleprops.rs: the purge's text-style usage scan now also counts the text styles referenced by multileaders, multileader styles and table styles.Test
purge_keeps_text_styles_used_only_by_leader_and_table_stylesfails without the fix. Fullcargo test --lib: 3154 passed, 0 failed.Checked in AutoCAD with a release build and the recipe above:
T1is kept, the multileader style, the multileader and its MTEXT still use it, AUDIT 0.