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
@@ -1148,7 +1148,7 @@ impl OpenCADStudio {
|
||||
// The command picked the path; the hit test lives here, where
|
||||
// the camera and the drawing's geometry are. Everything after
|
||||
// matches what a lasso does, Remove included.
|
||||
let canvas = self.tabs[i].scene.selection.borrow().vp_size;
|
||||
let canvas = self.tabs[i].scene.selection.borrow().view.vp_size;
|
||||
let bounds = iced::Rectangle {
|
||||
x: 0.0,
|
||||
y: 0.0,
|
||||
|
||||
@@ -364,7 +364,7 @@ impl OpenCADStudio {
|
||||
.is_some_and(|command| command.wants_point_pick_context())
|
||||
{
|
||||
let scene = &self.tabs[i].scene;
|
||||
let size = scene.selection.borrow().vp_size;
|
||||
let size = scene.selection.borrow().view.vp_size;
|
||||
let edit = scene.viewport_edit_frame(size);
|
||||
let tile = edit
|
||||
.as_ref()
|
||||
@@ -919,8 +919,8 @@ impl OpenCADStudio {
|
||||
let crossing = matches!(kw.as_str(), "C" | "CROSSING");
|
||||
{
|
||||
let mut selection = self.tabs[i].scene.selection.borrow_mut();
|
||||
selection.box_crossing = crossing;
|
||||
selection.box_crossing_locked = true;
|
||||
selection.gesture.box_crossing = crossing;
|
||||
selection.gesture.box_crossing_locked = true;
|
||||
}
|
||||
let hint = if crossing {
|
||||
crate::t!("Crossing: specify first corner.")
|
||||
|
||||
Reference in new issue
Block a user