Double click to toggle sharpness of an anchor's handles with the Path tool (#815)

* Double click to flip sharpness of anchor's handles

* Fix bad length

* Convert mirror distance to toggle

* Revert "Convert mirror distance to toggle"

This reverts commit 76b5650022.

* Fix mirror_distance_between_handles being inverted
This commit is contained in:
0HyperCube
2022-10-24 21:55:31 +01:00
committed by Keavon Chambers
parent 7f9c59dd99
commit 0553cc5100
3 changed files with 114 additions and 4 deletions
@@ -281,7 +281,11 @@ impl Fsm for PathToolFsmState {
PathToolFsmState::Ready
}
(_, PathToolMessage::InsertPoint) => {
tool_data.shape_editor.split(&document.graphene_document, input.mouse.position, SELECTION_TOLERANCE, responses);
// First we try and flip the sharpness (if they have clicked on an anchor)
if !tool_data.shape_editor.flip_sharp(&document.graphene_document, input.mouse.position, SELECTION_TOLERANCE, responses) {
// If not, then we try and split the path that may have been clicked upon
tool_data.shape_editor.split(&document.graphene_document, input.mouse.position, SELECTION_TOLERANCE, responses);
}
self
}