From ed55b1781d86ec49af5d2588cbd06f7b878d9009 Mon Sep 17 00:00:00 2001 From: "sorokin.oleg.edu" Date: Thu, 24 Sep 2026 14:28:53 -0700 Subject: [PATCH] Bind Scenario selection capture directly for strict lint --- crates/oa-desktop/src/behavior.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/oa-desktop/src/behavior.rs b/crates/oa-desktop/src/behavior.rs index 8d4004c0..23caa77a 100644 --- a/crates/oa-desktop/src/behavior.rs +++ b/crates/oa-desktop/src/behavior.rs @@ -2202,7 +2202,7 @@ impl canvas::Program for Scene { if !editable { return None; } - if self.selection.is_some() { + if let Some((selection_context, snapshot)) = &self.selection { let hit = self.hit_item(point).or_else(|| { (!self.is_group() && self.is_selected(self.selected) @@ -2234,10 +2234,8 @@ impl canvas::Program for Scene { .selection_action(Intent::Choose(target, Choice::Toggle)); } if self.is_group() && self.is_selected(hit.id) { - let (context, snapshot) = - self.selection.as_ref().expect("selection capture"); state.group_press = Some(ScenarioGroupPress { - context: *context, + context: *selection_context, snapshot: snapshot.clone(), target, start: cursor.position()?, @@ -2259,10 +2257,9 @@ impl canvas::Program for Scene { if state.modifiers.shift() { return Some(Action::capture()); } - let (context, snapshot) = self.selection.as_ref()?; // Background clearing shares this press with camera panning. return Some(Action::publish(scenario::selection::message( - *context, + *selection_context, snapshot, Intent::Clear, )));