Keep linked components valid through Undo after Save As (#6860) (#6877)

* claim: #6860

* fix: preserve linked component targets across Save As history (#6860)
This commit is contained in:
Colin Faulkingham
2026-10-26 11:08:32 +00:00
committed by GitHub
parent 25ad6c7266
commit 03bf992bc1
8 changed files with 183 additions and 44 deletions
+1 -1
View File
@@ -592,7 +592,7 @@ pub(super) fn extract(s: &mut Session, p: &Value) -> Result<Value> {
f.link_faces = faces;
}
let path = stored(s.path.as_deref(), &file);
s.doc_mut().links.insert(comp, DesignLink { path: path.clone(), feature: id });
s.doc_mut().links.insert(comp, DesignLink { path: file.to_string_lossy().into_owned(), feature: id });
s.refresh();
rename_joint_faces(s, &state, id, &sc.own);
if let Some(e) = s.model.result(id).and_then(|r| r.error.clone()) {