The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Set corners type to curve when merging paths

These changes was commited to the Birdfont repository Mon, 10 Aug 2015 13:10:23 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Mon, 10 Aug 2015 13:10:23 +0000]

Updated Files

libbirdfont/StrokeTool.vala
--- a/libbirdfont/StrokeTool.vala +++ b/libbirdfont/StrokeTool.vala @@ -106,6 +106,7 @@ PathList o = new PathList (); PathList r; PathList new_paths = new PathList (); + PathList removed_paths = new PathList (); g.store_undo_state (); @@ -147,6 +148,10 @@ /*o.paths.remove (p1); o.paths.remove (p2); */ + + removed_paths.add (p1); + removed_paths.add (p2); + i = 0; j = 0; } @@ -161,7 +166,7 @@ //o.append (new_paths); - foreach (Path p in g.active_paths) { + foreach (Path p in removed_paths.paths) { g.delete_path (p); } @@ -624,6 +629,13 @@ break; } + // adjust the other handle + if ((ep1.flags & EditPoint.INTERSECTION) > 0) { + ep1.left_handle.convert_to_curve (); + ep1.right_handle.convert_to_curve (); + } + + // add point to path ep1.flags |= EditPoint.COPIED; new_path.add_point (ep1.copy ());