mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-07-07 15:55:00 +00:00
delete splines with <2 points
This commit is contained in:
parent
1c24ad0928
commit
45f01ae263
1 changed files with 8 additions and 3 deletions
|
@ -430,9 +430,14 @@ impl Fsm for SplineToolFsmState {
|
|||
SplineToolFsmState::MergingEndpoints
|
||||
}
|
||||
(SplineToolFsmState::Drawing, SplineToolMessage::Abort) => {
|
||||
delete_preview(tool_data, responses);
|
||||
|
||||
responses.add(DocumentMessage::EndTransaction);
|
||||
if tool_data.points.len() < 2 {
|
||||
// Delete layer if it is only a single point
|
||||
responses.add(DocumentMessage::AbortTransaction);
|
||||
} else {
|
||||
// Delete the preview of the next stroke but commit the path
|
||||
delete_preview(tool_data, responses);
|
||||
responses.add(DocumentMessage::EndTransaction);
|
||||
}
|
||||
SplineToolFsmState::Ready
|
||||
}
|
||||
(_, SplineToolMessage::WorkingColorChanged) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue