forked from 1b-agent/opencadstudio-upstream
refactor(selection): split 31-field SelectionState into five sub-structs
SelectionState now holds view, gesture, input, menu and orbit sub-structs; all 450 access sites updated mechanically with no behavior change. Deletes three write-only dead fields (box_last, box_last_crossing, poly_last_crossing). Hand-rolled clears in commands and dim_viewport route through the new clear methods; bench fixture updated. Full suite: 1976 passed / 0 failed / 25 ignored.
This commit is contained in:
1 parent
8c2cfa2c8f
commit
7aafd9c710
27 files changed
+512
-469
No files matched your search
@@ -3068,7 +3068,7 @@ impl super::Scene {
|
||||
/// `(id, anchor, outward_screen_direction, label, is_conflicting,
|
||||
/// hover_points)` for every enabled, visible constraint whose glyph
|
||||
/// projects on-screen.
|
||||
/// `vp_size` is the full canvas size (as `SelectionState::vp_size`
|
||||
/// `vp_size` is the full canvas size (as `SelectionView::vp_size`
|
||||
/// reports it), matching what `viewport_edit_frame`/
|
||||
/// `active_model_tile_bounds` expect. Mirrors the projection
|
||||
/// `crate::app::view` builds its own render list with. The memoised
|
||||
@@ -3808,7 +3808,7 @@ mod tests {
|
||||
Vector3::new(1.0, 0.0, 0.0),
|
||||
),
|
||||
));
|
||||
scene.selection.borrow_mut().vp_size = (800.0, 600.0);
|
||||
scene.selection.borrow_mut().view.vp_size = (800.0, 600.0);
|
||||
let id = scene.parametric_constraint_set_mut(scope).add(
|
||||
ConstraintKind::Horizontal,
|
||||
vec![ParametricRef::whole(line)],
|
||||
@@ -3848,7 +3848,7 @@ mod tests {
|
||||
Vector3::new(1.0, 0.0, 0.0),
|
||||
),
|
||||
));
|
||||
scene.selection.borrow_mut().vp_size = (800.0, 600.0);
|
||||
scene.selection.borrow_mut().view.vp_size = (800.0, 600.0);
|
||||
let id = scene.parametric_constraint_set_mut(scope).add(
|
||||
ConstraintKind::Horizontal,
|
||||
vec![ParametricRef::whole(line)],
|
||||
@@ -3878,7 +3878,7 @@ mod tests {
|
||||
Vector3::new(1.0, 0.0, 0.0),
|
||||
),
|
||||
));
|
||||
scene.selection.borrow_mut().vp_size = (800.0, 600.0);
|
||||
scene.selection.borrow_mut().view.vp_size = (800.0, 600.0);
|
||||
let id = scene.parametric_constraint_set_mut(scope).add(
|
||||
ConstraintKind::Horizontal,
|
||||
vec![ParametricRef::whole(line)],
|
||||
|
||||
Reference in new issue
Block a user