From 30418c51f85499582249edcc2a14fae21fdf2c87 Mon Sep 17 00:00:00 2001 From: Keavon Chambers Date: Tue, 21 Dec 2021 18:48:21 -0800 Subject: [PATCH] Make the Pen Tool confirm when leaving the tool --- editor/src/tool/tools/pen.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/editor/src/tool/tools/pen.rs b/editor/src/tool/tools/pen.rs index 26b06c67..56bae86c 100644 --- a/editor/src/tool/tools/pen.rs +++ b/editor/src/tool/tools/pen.rs @@ -117,7 +117,7 @@ impl Fsm for PenToolFsmState { Dragging } - (Dragging, Confirm) => { + (Dragging, Confirm) | (Dragging, Abort) => { if data.points.len() >= 2 { responses.push_back(DocumentMessage::DeselectAllLayers.into()); responses.extend(make_operation(data, tool_data, false)); @@ -132,14 +132,6 @@ impl Fsm for PenToolFsmState { Ready } - (Dragging, Abort) => { - responses.push_back(DocumentMessage::AbortTransaction.into()); - data.points.clear(); - data.path = None; - data.snap_handler.cleanup(); - - Ready - } _ => self, } } else {