mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
fix(ui): the Frame tool does nothing in Bitmap and Indexed Color (#13886)
Signed-off-by: MaheshDesu <[email protected]>
This commit is contained in:
1 parent
030e6dbedd
commit
9948e6f1e7
1 file changed
+4
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user