forked from 1b-agent/opencadstudio-upstream
Separate spline fit and control properties
This commit is contained in:
1 parent
1a6b61fb3a
commit
96e8d75cc5
3 files changed
+35
-9
No files matched your search
@@ -121,10 +121,12 @@ impl OpenCADStudio {
|
||||
acadrust::EntityType::LwPolyline(polyline) => Some(polyline.vertices.len()),
|
||||
acadrust::EntityType::Polyline2D(polyline) => Some(polyline.vertices.len()),
|
||||
acadrust::EntityType::Leader(leader) => Some(leader.vertices.len()),
|
||||
acadrust::EntityType::Spline(spline) => Some(if spline.fit_points.is_empty() {
|
||||
spline.control_points.len()
|
||||
} else {
|
||||
acadrust::EntityType::Spline(spline) => Some(if !spline.cv_frame_visible
|
||||
&& !spline.fit_points.is_empty()
|
||||
{
|
||||
spline.fit_points.len()
|
||||
} else {
|
||||
crate::entities::spline::control_vertex_count(spline)
|
||||
}),
|
||||
_ => None,
|
||||
});
|
||||
|
||||
@@ -2138,7 +2138,9 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task<Message> {
|
||||
(
|
||||
"current_control_point",
|
||||
acadrust::EntityType::Spline(spline),
|
||||
) => Some(spline.control_points.len()),
|
||||
) => Some(
|
||||
crate::entities::spline::control_vertex_count(spline),
|
||||
),
|
||||
_ => None,
|
||||
}
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user