Repository navigation
Conversation
…s away A design coming back to its tab compares the modification time and size of its linked design files with what they were when it went to the background, and runs Update Links on the worker thread for those that changed: saved in another tab, another window or by a checkout. Preference update_changed_links (Design, Linked designs) turns it off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…turns Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s tried again A design's linked files are now recorded as the design last read them: when Update Links reads a link without an error, or when the link is first seen. Coming back to the tab reads again what differs, one link per run, so a file that cannot be read holds up no other and is tried again the next time, and a part changed while the assembly was shown is taken up on its next return. Closing several tabs together reads nothing on the way, and the web build, which keeps no file times, looks at nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gns and missing files A tab shown to answer "save changes?" reads no link before its save, and Cancel there or on a batch lets the tab left in front read what it skipped. A design opened in place of the blank one records its links at once, a link whose file is missing is recorded as missing so it is read when the file comes back, and a read queued for a design that is no longer shown by the time it starts is dropped. More changed links than can wait at once are read on the next return. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
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.
Change
A part linked into an assembly can only be edited in its own design, so after saving it in another tab the assembly kept showing the old bodies until Update Links was run by hand.
Each design now keeps, for every linked design file, the modification time and size it last read: when Update Links reads the link without an error, or when the design first shows the link. When the tab comes back, the links whose files differ from that are read again the way Update Links does it, on the worker thread with its progress overlay, one link per run (
file_load's Update Links request now passes its options on). A file that can't be read holds up no other and is tried again the next time. That covers a part saved in another tab, in another SolidCraft window or by a git checkout, also while the assembly was the tab in front. The assembly is marked as changed afterwards, since it keeps its own copy of the linked bodies.Closing several tabs together or quitting reads nothing on the way, and a tab shown to answer "save changes?" reads nothing before its save. The check runs
component.linksand one file stat per link on the window thread when a tab comes back, so an allowed network share that is slow shows there; a network location that isn't allowed is never looked at. The web build keeps no modification times, so nothing changes there. The assembly guide says so.Closes #7601
Changes a default: yes - an assembly updates its changed linked designs when its tab comes back (Preferences, Design, "Update changed linked designs when a tab comes back"), old behaviour kept behind preference update_changed_links
Validation
On Linux: nine tests in
linked_sourcecover a save in the part's tab and outside the app, the preference turned off, a link that can't be read next to one that can, a change made while the assembly is shown, a design opened in place of the blank one, a missing file that comes back, Close All with and without Cancel, the save-changes prompt, and reads dropped for a design no longer shown.cargo xtask cipasses fmt, clippy, lists, layers and the engine, doc, kernel, scenario and action-matrix tests, and every ui-egui test apart fromprogressive_image_controls_route_to_the_registered_host("inconsistent glass medium paths"), which also fails on an unchangedmain; thegpupath tracer tests fail on this machine's Radeon iGPU, in a crate this doesn't touch. The wasm check couldn't run here for lack of the target; the previous version passedcargo xtask wasmon another machine. Not run on Windows or macOS.Screenshots of the behavior (when observable)
A base plate with a post and a knob, each a linked design, held by two rigid joints. The knob gets a pin in its own tab and is saved; switching back updates the assembly and keeps both joints. Last, the new setting under Preferences, Design.
Integration status
Based on 4afd933. #5674 (Update Links skips unchanged files) would make these updates cheaper and doesn't conflict. #5449 also works on links in
component_link.rs, which this doesn't touch.