mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 14:18:04 +08:00
Fix Spline tool aborting after placing only 1 point so it removes the incomplete layer (#3220)
* right click now correctly cancels spline extend * Code review --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -468,9 +468,13 @@ impl Fsm for SplineToolFsmState {
|
||||
state
|
||||
}
|
||||
(SplineToolFsmState::Drawing, SplineToolMessage::Confirm) => {
|
||||
if tool_data.points.len() >= 2 {
|
||||
delete_preview(tool_data, responses);
|
||||
if tool_data.points.len() <= 1 {
|
||||
responses.add(DocumentMessage::AbortTransaction);
|
||||
return SplineToolFsmState::Ready;
|
||||
}
|
||||
|
||||
delete_preview(tool_data, responses);
|
||||
|
||||
responses.add(SplineToolMessage::MergeEndpoints);
|
||||
SplineToolFsmState::MergingEndpoints
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user