fix(properties): scope asym-scale opt-out per tab

props_asym_scale was app-global keyed by raw handle values, but fresh documents restart numbering at seed 1, leaking one tab's unchecked Uniform box into another tab reusing the value. The set moves to DocumentTab; all uses tab-scoped. Also removes a dead destructure left in overlay.rs. Test: asym_scale_opt_out_does_not_leak_across_tabs with handle-reuse premise assert (RED first). Full suite: 2025 passed / 0 failed / 25 ignored, zero warnings.
This commit is contained in:
Karim Jerbi committed 2026-10-10 16:14:22 +01:00
1 parent 6ad3183b3d
commit d1da26feb6
5 files changed
+50 -10

No files matched your search

+7
View File
@@ -206,6 +206,12 @@ pub(super) struct DocumentTab {
pub(super) dyn_active: usize,
pub(super) history: HistoryState,
pub(super) active_layer: String,
/// Block references whose properties panel shows per-axis Scale X/Y/Z even
/// though the three factors are currently equal — the user unchecked the
/// "Uniform scale" box for them (#427). Per-tab: fresh documents restart
/// handle numbering, so an app-global set keyed by raw handle leaks one
/// tab's opt-out into another tab reusing the value (#47).
pub(super) props_asym_scale: std::collections::HashSet<u64>,
/// Node graph shown by the command line's graph button.
pub(super) graph: crate::ui::node_graph::Graph,
/// Currently active UCS. `None` means WCS (identity transform).
@@ -649,6 +655,7 @@ impl DocumentTab {
dyn_active: 0,
history: HistoryState::default(),
active_layer: "0".to_string(),
props_asym_scale: std::collections::HashSet::new(),
graph: Default::default(),
active_ucs: None,
sketch_session: None,