forked from 1b-agent/opencadstudio-upstream
Merge branch 'HakanSeven12:main' into main
This commit is contained in:
54 files changed
+20761
-818
No files matched your search
+21
-1
@@ -611,7 +611,8 @@ bg={bg_ms:.1}ms n={view_count}"
|
||||
};
|
||||
let control_polygon = tab.selected_handle.and_then(|handle| {
|
||||
let spline = match tab.scene.document.get_entity(handle) {
|
||||
Some(acadrust::EntityType::Spline(spline)) if spline.cv_frame_visible => spline,
|
||||
Some(acadrust::EntityType::Spline(spline))
|
||||
if crate::entities::spline::shows_control_vertices(spline) => spline,
|
||||
_ => return None,
|
||||
};
|
||||
if tab
|
||||
@@ -833,6 +834,23 @@ bg={bg_ms:.1}ms n={view_count}"
|
||||
.active_cmd
|
||||
.as_ref()
|
||||
.is_some_and(|cmd| !cmd.needs_entity_pick() && !cmd.is_selection_gathering());
|
||||
let constraint_cursor_badge = if is_paper {
|
||||
None
|
||||
} else {
|
||||
tab.scene.hover_highlight.and_then(|handle| {
|
||||
tab.scene
|
||||
.parametric_constraint_set(tab.current_parametric_scope())
|
||||
.and_then(|set| {
|
||||
set.constraints_touching(handle)
|
||||
.find(|constraint| {
|
||||
constraint.kind
|
||||
== crate::scene::parametric_constraints::ConstraintKind::Concentric
|
||||
})
|
||||
.or_else(|| set.constraints_touching(handle).next())
|
||||
})
|
||||
.map(|constraint| constraint.kind.glyph_symbol().to_string())
|
||||
})
|
||||
};
|
||||
let constraint_glyphs: Vec<(
|
||||
iced::Point,
|
||||
[f32; 2],
|
||||
@@ -850,6 +868,7 @@ bg={bg_ms:.1}ms n={view_count}"
|
||||
sel_ref.vp_size,
|
||||
self.show_constraint_values,
|
||||
self.constraint_bar_display,
|
||||
self.constraint_bar_mode,
|
||||
)
|
||||
.into_iter()
|
||||
.map(|(id, point, direction, label, is_conflicting, hover_points)| {
|
||||
@@ -910,6 +929,7 @@ bg={bg_ms:.1}ms n={view_count}"
|
||||
constraint_glyphs,
|
||||
self.constraint_glyph_tooltip
|
||||
.map(|kind| crate::t!(kind.label()).into_owned()),
|
||||
constraint_cursor_badge,
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user