From 9948e6f1e751ef148e4e27522a37b60200a4a562 Mon Sep 17 00:00:00 2001 From: MaheshDesu Date: Mon, 16 Nov 2026 11:28:15 +0530 Subject: [PATCH] fix(ui): the Frame tool does nothing in Bitmap and Indexed Color (#13886) Signed-off-by: MaheshDesu --- crates/ui-egui/src/tools/frame_tool.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/tools/frame_tool.rs b/crates/ui-egui/src/tools/frame_tool.rs index a3b43bc664..cf83f9a185 100644 --- a/crates/ui-egui/src/tools/frame_tool.rs +++ b/crates/ui-egui/src/tools/frame_tool.rs @@ -583,7 +583,10 @@ impl CanvasTool for FramePass<'_> { let (reach, scope, mods, clicks) = (view.doc_len(cx.reach()), self.scope, pointer.mods, pointer.clicks); let style = ConstrainStyle::new(f64::from(cx.slop), f64::from(cx.slop)); match scope.with_app(|app| press_rule(app, at, clicks, reach, &style, mods)) { - Pressed::Draw => self.state.draw.press(pointer, cx), + Pressed::Draw => { + // Bitmap and Indexed Color documents make no frame (#13886): no drag, preview or alert. + if self.scope.with_app(|app| app.session.is_enabled("layer.new.frame")) { self.state.draw.press(pointer, cx) } else { ToolAction::Done } + } Pressed::Done => ToolAction::Done, Pressed::Move(m) => { self.state.moving = Some(m);