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:
Austin Henlotter 2026-02-15 20:01:11 -05:00 committed by GitHub
parent b697cc8131
commit f186465220
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -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
}