The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Close paths on grid

These changes was commited to the Birdfont repository Fri, 08 May 2015 20:04:28 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 08 May 2015 20:04:28 +0000 (22:04 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 08 May 2015 20:04:28 +0000 (22:04 +0200)
commit 1d81229d0f22009ba6e182ca669909e0802a6631
tree 4bd0c50c1bd51060d9b0ab2f033ea93c66f1cf4f
parent 870419173f31feb701b38b565b1be093a500c650
Close paths on grid

libbirdfont/PenTool.vala
--- a/libbirdfont/PenTool.vala +++ b/libbirdfont/PenTool.vala @@ -160,6 +160,10 @@ g = MainWindow.get_current_glyph (); x = Glyph.path_coordinate_x (ix); y = Glyph.path_coordinate_y (iy); + + + if (active_edit_point == null) print ("NULL\n"); + else print ("NOT NULL\n"); if (has_join_icon () && active_edit_point != null) { join_paths ((!) active_edit_point); @@ -1371,6 +1375,7 @@ } } + warning ("No point to merge."); return null; } @@ -1389,8 +1394,7 @@ } // join path with it self - if (is_endpoint (end_point) - && is_close_to_point (path.points.get (0), px, py)) { + if (is_close_to_point (path.points.get (0), px, py)) { close_path (path); glyph.close_path (); @@ -1464,6 +1468,7 @@ update_selection (); } + warning ("No paths merged."); return null; } @@ -1697,9 +1702,7 @@ if (distance < contact_surface) { set_active_edit_point (e.point, e.path); - - active_path = e.path; - g.add_active_path (active_path); + e.path.reset_stroke (); } }