From 7afba9bde4dbf2111ccd9b608ed0e3e122cedb7d Mon Sep 17 00:00:00 2001 From: bflatastic Date: Thu, 29 Oct 2026 20:24:49 +0700 Subject: [PATCH] Keep the hit for the isolation check --- crates/tools/src/direct.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/tools/src/direct.rs b/crates/tools/src/direct.rs index 4a7639ae0..5e32e4a19 100644 --- a/crates/tools/src/direct.rs +++ b/crates/tools/src/direct.rs @@ -920,7 +920,7 @@ impl DirectSelectionTool { } // A double-click edits what is drawn: not a clipping path's outline. let hit = hit_test(cx.doc, p, cx.hit_options()); - if hit.and_then(|h| cx.doc.node(h.leaf)).is_some_and(|n| matches!(n.kind, NodeKind::Text(_))) { + if hit.as_ref().and_then(|h| cx.doc.node(h.leaf)).is_some_and(|n| matches!(n.kind, NodeKind::Text(_))) { return vec![Action::SwitchTool("type".into())]; } // Outside the isolated art it leaves isolation mode, as with the Selection tool (#4466).