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 8f100b4f0a
commit 9020dd7428

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 {