mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 21:48:12 +08:00
Make the Pen Tool confirm when leaving the tool
This commit is contained in:
@@ -117,7 +117,7 @@ impl Fsm for PenToolFsmState {
|
|||||||
|
|
||||||
Dragging
|
Dragging
|
||||||
}
|
}
|
||||||
(Dragging, Confirm) => {
|
(Dragging, Confirm) | (Dragging, Abort) => {
|
||||||
if data.points.len() >= 2 {
|
if data.points.len() >= 2 {
|
||||||
responses.push_back(DocumentMessage::DeselectAllLayers.into());
|
responses.push_back(DocumentMessage::DeselectAllLayers.into());
|
||||||
responses.extend(make_operation(data, tool_data, false));
|
responses.extend(make_operation(data, tool_data, false));
|
||||||
@@ -132,14 +132,6 @@ impl Fsm for PenToolFsmState {
|
|||||||
|
|
||||||
Ready
|
Ready
|
||||||
}
|
}
|
||||||
(Dragging, Abort) => {
|
|
||||||
responses.push_back(DocumentMessage::AbortTransaction.into());
|
|
||||||
data.points.clear();
|
|
||||||
data.path = None;
|
|
||||||
data.snap_handler.cleanup();
|
|
||||||
|
|
||||||
Ready
|
|
||||||
}
|
|
||||||
_ => self,
|
_ => self,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user