Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion editor/src/messages/tool/tool_messages/spline_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,14 @@ impl Fsm for SplineToolFsmState {
SplineToolFsmState::MergingEndpoints
}
(SplineToolFsmState::Drawing, SplineToolMessage::Abort) => {
responses.add(DocumentMessage::AbortTransaction);
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) => {
Expand Down
Loading