forked from 1b-agent/opencadstudio-upstream
refactor: rename mislabeled scene files to match contents
Two names collided with the pick subsystem and misdescribed their files: - scene/hittest.rs -> scene/camera_ops.rs. Its contents are camera/view operations (zoom, fit-all, named-view restore, camera<->document sync, per-tile grid/snap), not hit-testing — the real screen-space hit-test lives in scene/pick/hit_test.rs. - scene/pick/selection.rs -> scene/pick/selection_state.rs. It holds only the SelectionState struct; the name clashed with scene/selection.rs (the Scene selection operations). Callers are unaffected (the crate::scene::SelectionState re-export path is unchanged). No behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
1cd7aaed4e
commit
9b8ee94c0c
4 files changed
+6
-4
No files matched your search
@@ -0,0 +1,32 @@
|
||||
use iced::time::Instant;
|
||||
use iced::Point;
|
||||
|
||||
/// Mouse / selection interaction state for the viewport.
|
||||
#[derive(Clone, Default)]
|
||||
pub struct SelectionState {
|
||||
pub vp_size: (f32, f32),
|
||||
pub box_anchor: Option<Point>,
|
||||
pub box_current: Option<Point>,
|
||||
pub box_last: Option<(Point, Point)>,
|
||||
pub box_crossing: bool,
|
||||
pub box_last_crossing: bool,
|
||||
pub poly_active: bool,
|
||||
pub poly_points: Vec<Point>,
|
||||
pub poly_crossing: bool,
|
||||
pub poly_last_crossing: bool,
|
||||
pub context_menu: Option<Point>,
|
||||
/// True while the context menu's Draw Order sub-items are expanded.
|
||||
pub draworder_submenu: bool,
|
||||
pub last_move_pos: Option<Point>,
|
||||
pub left_down: bool,
|
||||
pub left_press_pos: Option<Point>,
|
||||
pub left_press_time: Option<Instant>,
|
||||
pub left_dragging: bool,
|
||||
pub right_down: bool,
|
||||
pub right_press_pos: Option<Point>,
|
||||
pub right_dragging: bool,
|
||||
pub right_last_pos: Option<Point>,
|
||||
pub middle_down: bool,
|
||||
pub middle_last_pos: Option<Point>,
|
||||
pub middle_last_press_time: Option<Instant>,
|
||||
}
|
||||
Reference in new issue
Block a user