From 9b8ee94c0c234d2cb1401d22b0e3cae519a949cb Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Fri, 26 Jun 2026 23:45:16 +0300 Subject: [PATCH] refactor: rename mislabeled scene files to match contents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/scene/{hittest.rs => camera_ops.rs} | 4 +++- src/scene/mod.rs | 4 ++-- src/scene/pick/mod.rs | 2 +- src/scene/pick/{selection.rs => selection_state.rs} | 0 4 files changed, 6 insertions(+), 4 deletions(-) rename src/scene/{hittest.rs => camera_ops.rs} (99%) rename src/scene/pick/{selection.rs => selection_state.rs} (100%) diff --git a/src/scene/hittest.rs b/src/scene/camera_ops.rs similarity index 99% rename from src/scene/hittest.rs rename to src/scene/camera_ops.rs index f7ddf21a9..46ebe73cc 100644 --- a/src/scene/hittest.rs +++ b/src/scene/camera_ops.rs @@ -1,4 +1,6 @@ -// Auto-split from scene/mod.rs. Pure text-move; behaviour unchanged. +// Camera / view operations on `Scene`: zoom, fit-all, named-view restore, +// camera<->document sync, and per-tile grid/snap. (The actual screen-space +// hit-testing lives in `scene::pick::hit_test`.) use super::*; impl Scene { diff --git a/src/scene/mod.rs b/src/scene/mod.rs index c6dc00dab..7247e5883 100644 --- a/src/scene/mod.rs +++ b/src/scene/mod.rs @@ -17,7 +17,7 @@ pub mod view; // blocks and/or free functions). Pure text-move from the original mod.rs. mod entity; mod group_layer; -mod hittest; +mod camera_ops; mod layout; mod modify; mod mspace; @@ -53,7 +53,7 @@ pub use pipeline::viewcube::{ hit_test, hit_test_cardinal, hover_id, CubeRegion, NudgeDir, VIEWCUBE_DRAW_PX, VIEWCUBE_PAD, VIEWCUBE_PX, VIEWCUBE_REGION_PX, }; -pub use pick::selection::SelectionState; +pub use pick::selection_state::SelectionState; pub use model::wire_model::WireModel; use crate::command::EntityTransform; diff --git a/src/scene/pick/mod.rs b/src/scene/pick/mod.rs index 03381292b..419a60c57 100644 --- a/src/scene/pick/mod.rs +++ b/src/scene/pick/mod.rs @@ -1,5 +1,5 @@ pub mod hit_test; -pub mod selection; +pub mod selection_state; pub mod grip; pub mod quadtree; pub mod xclip; diff --git a/src/scene/pick/selection.rs b/src/scene/pick/selection_state.rs similarity index 100% rename from src/scene/pick/selection.rs rename to src/scene/pick/selection_state.rs