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:
parent
b697cc8131
commit
f186465220
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue