Edit Sketch no longer shows bodies a later feature deletes (#1329)
Fixes #1167. While a sketch is edited, a body that a rolled-off, unsuppressed Remove deletes is not shown (unless the sketch is built on it); the history stays rolled back, only the view changes. Drawing, picking, screenshots, thumbnails and the browser's Bodies folder agree; document.inspect reports removed_later. Checked on main + this branch: cargo check --workspace, the engine sketch_edit_removed/occurrences tests and the UI viewport/browser tests.
This commit is contained in:
1 parent
5fa8e7d60a
commit
9fbbf8dc3a
9 files changed
+332
-4
No files matched your search
@@ -108,6 +108,31 @@ impl LinkSource {
|
||||
LinkSource::Text { text, .. } => format!("text \"{}\"", text.chars().take(20).collect::<String>()),
|
||||
}
|
||||
}
|
||||
|
||||
/// The bodies this source reads geometry from (an intersection reads two).
|
||||
pub fn bodies(&self) -> Vec<&str> {
|
||||
match self {
|
||||
LinkSource::Edge { body, .. }
|
||||
| LinkSource::Face { body, .. }
|
||||
| LinkSource::Body { body }
|
||||
| LinkSource::Vertex { body, .. }
|
||||
| LinkSource::OnSurface { body, .. }
|
||||
| LinkSource::Iso { body, .. }
|
||||
| LinkSource::Spun { body, .. } => vec![body.as_str()],
|
||||
LinkSource::Intersection { a, b } => {
|
||||
let mut bodies = a.bodies();
|
||||
bodies.extend(b.bodies());
|
||||
bodies
|
||||
}
|
||||
LinkSource::SketchCurve { .. }
|
||||
| LinkSource::SketchPoint { .. }
|
||||
| LinkSource::Origin
|
||||
| LinkSource::Axis { .. }
|
||||
| LinkSource::SketchAxis { .. }
|
||||
| LinkSource::Plane { .. }
|
||||
| LinkSource::Text { .. } => Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Half length of the line a sketch axis link produces.
|
||||
|
||||
Reference in new issue
Block a user