Repository navigation
.ai save: text wrap fixes for cut-away clipping fills and symbols without room - #7466
Merged
bflatastic merged 6 commits intoNov 14, 2026
Merged
Conversation
…hout room Two faults in the editing data writer's text wrap handling: - A clipping path inside art cut to an outer clipping object is written as its fill and its stroke. The stroke's text wrap options were dropped whenever the path had a fill, so when the outer object cut the fill away entirely, the stroke was written without them and the options were lost. The stroke now drops them only after the fill writes an object. - When a symbol definition had no room left under the object limit, `define_symbol` returned without restoring the drawn-art counter it had cleared. A live instance inside drawn art (a stained instance's art) then left the counter at zero, and the art around it subtracted from zero: a panic in a debug build. That path now restores the counter as the other exits do.
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 17 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 14, 2026
3 of 4 tasks
Member
|
Merged, thanks @dotCooCoo! It passed its CI checks. |
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.
What and why
Two faults in the
.aiediting-data writer's text wrap handling, a follow-up to #7319.clip_contents(crates/eps/src/ai_editing/writer.rs:1041) removed them from the stroke whenever the path had a fill, before knowing whether the fill wrote anything. When the outer object cut the fill away entirely, nothing carried the options. The stroke now drops them only when the fill writes an object, counted with the writer's object count rather than the text length, since a lock or hide state line can be written without an object.define_symbolclearsdrawnwhile it writes a definition and restores it on every exit except the one wheretake_objects(1)fails (crates/eps/src/ai_editing/writer/symbols.rs:233). A live instance inside drawn art, such as a stained instance's art, then returned with the counter at zero, and the art around it subtracted from zero atcrates/eps/src/ai_editing/writer.rs:714: a panic in a debug build, a wrapped counter otherwise. That exit now restores it as the others do.How it was tested
New tests in
crates/eps/src/ai_editing/tests.rs, each shown failing without its fix:a_clipping_path_written_as_its_paint_keeps_one_text_wrapgains a case: an outer clipping object ending at x = 100 and a clipping path whose fill starts at x = 101 with a 4 pt stroke, unlocked and locked. The saved file has the options once and they are read back on the stroke. Without the fix the count is 0; with a text-length check the locked case fails.a_definition_without_room_inside_drawn_art_is_left_out: a stained instance whose symbol's art holds a live instance, exported with room for every count of objects below what it needs. Each export warns about the limit and stays within it. Without the fix it panics with "attempt to subtract with overflow".Focused checks on Linux. The branch is one commit on
mainat1e4e3534f5and merges cleanly with it and with open #7268, #7254, #7394 and #7425, which also changewriter.rs.cargo test -p vectorcraft-eps --lib -- ai_editing: 262 passed.cargo clippy -p vectorcraft-eps --all-targets -- -D warnings: no warnings.cargo fmt --all -- --checkreports onlycrates/svg/src/lib.rs:491, which this branch does not touch; it is unformatted onmainat1e4e3534f5, and open fmt: format crates/svg/src/lib.rs #7400 formats it.cargo xtask ciruns in this pull request's CI.Checklist
cargo xtask cipasses (fmt, clippy, tests, assets, brands, layers, wasm).unwrap(),expect(),panic!,unreachable!,todo!orunimplemented!outside tests, and no unchecked indexing on data from files, parameters ormessages. Errors are returned as
Resultand shown to the user(why and how).
ASSETS.md.