Make the Pen Tool confirm when leaving the tool

This commit is contained in:
Keavon Chambers 2021-12-21 18:48:21 -08:00
parent dd8cd4a2fa
commit 30418c51f8
1 changed files with 1 additions and 9 deletions

View File

@ -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 {