forked from 1b-agent/opencadstudio-upstream
ui: reuse precise point crosshair for selection without enabling snaps
This commit is contained in:
1 parent
d4b7e4bfb8
commit
b6c4e0a81d
1 file changed
+8
-6
+8
-6
@@ -916,10 +916,13 @@ bg={bg_ms:.1}ms n={view_count}"
|
|||||||
.hover_highlight
|
.hover_highlight
|
||||||
.map(|h| tab.scene.is_layer_locked(h))
|
.map(|h| tab.scene.is_layer_locked(h))
|
||||||
.unwrap_or(false);
|
.unwrap_or(false);
|
||||||
let point_cursor = tab
|
// Reuse the exact point-picking crosshair (cross + center dot)
|
||||||
.active_cmd
|
// already used by LINE and RECTANG for ordinary selection and
|
||||||
.as_ref()
|
// selection-gathering commands. This changes only cursor drawing,
|
||||||
.is_some_and(|cmd| !cmd.needs_entity_pick() && !cmd.is_selection_gathering());
|
// not object snapping or the selected world position.
|
||||||
|
let point_cursor = tab.active_cmd.as_ref().is_none_or(|cmd| {
|
||||||
|
!cmd.needs_entity_pick() || cmd.is_selection_gathering()
|
||||||
|
});
|
||||||
let constraint_cursor_badge = if is_paper {
|
let constraint_cursor_badge = if is_paper {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
@@ -994,8 +997,7 @@ bg={bg_ms:.1}ms n={view_count}"
|
|||||||
// apart from both idle and point input (#1661).
|
// apart from both idle and point input (#1661).
|
||||||
hide_arms: tab.active_cmd.as_ref().is_some_and(|c| {
|
hide_arms: tab.active_cmd.as_ref().is_some_and(|c| {
|
||||||
matches!(c.name(), "XLINE" | "RAY")
|
matches!(c.name(), "XLINE" | "RAY")
|
||||||
|| c.needs_entity_pick()
|
|| (c.needs_entity_pick() && !c.is_selection_gathering())
|
||||||
|| c.is_selection_gathering()
|
|
||||||
}),
|
}),
|
||||||
snap_color: self.snap_marker_color,
|
snap_color: self.snap_marker_color,
|
||||||
snap_size: self.model_space.snap_marker_size as f32,
|
snap_size: self.model_space.snap_marker_size as f32,
|
||||||
|
|||||||
Reference in new issue
Block a user