Commit 31d581a
Fix symmetrical handles
Changed files (2)
Diff
@@ -219,6 +219,12 @@ public class EditPoint : GLib.Object { /** Make handles symmetrical. */ public void set_reflective_handles (bool symmetrical) { reflective_point = symmetrical;+ + if (symmetrical) {+ get_left_handle ().convert_to_curve ();+ get_right_handle ().convert_to_curve ();+ process_tied_handle ();+ } } /** Flip handles if next point on path is in the other direction. @@ -288,7 +294,6 @@ public class EditPoint : GLib.Object { } } - /** This can only be performed if the path has been closed. */ public void process_tied_handle () requires (next != null && prev != null) { double a, b, c, length, angle;@@ -1240,7 +1240,7 @@ public class PenTool : Tool { } // alt+click creates a point with symmetrical handles- if (KeyBindings.has_alt () || KeyBindings.has_ctrl ()) {+ if (KeyBindings.has_alt () || KeyBindings.has_ctrl ()) { selected_point.set_reflective_handles (true); selected_point.get_right_handle ().process_symmetrical_handle (); GlyphCanvas.redraw ();