The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Fix minor drawing canvas bugs

These changes was commited to the Birdfont repository Sat, 06 Sep 2014 21:01:03 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Sat, 06 Sep 2014 21:01:03 +0000]

Updated Files

libbirdfont/EditPointHandle.vala
libbirdfont/PenTool.vala
libbirdfont/SpacingClassTab.vala
--- a/libbirdfont/EditPointHandle.vala +++ b/libbirdfont/EditPointHandle.vala @@ -235,16 +235,16 @@ if (!is_left_handle ()) { if (parent.next != null) { h = parent.get_next ().get_left_handle (); + h.parent.set_tie_handle (false); h.type = PointType.QUADRATIC; h.move_to_coordinate_internal (px (), py ()); - h.parent.set_tie_handle (false); } } else { if (parent.prev != null) { h = parent.get_prev ().get_right_handle (); + h.parent.set_tie_handle (false); h.type = PointType.QUADRATIC; h.move_to_coordinate_internal (px (), py ()); - h.parent.set_tie_handle (false); } } }
--- a/libbirdfont/PenTool.vala +++ b/libbirdfont/PenTool.vala @@ -570,6 +570,7 @@ if (KeyBindings.modifier == SHIFT) { selected_handle.angle = angle; + selected_handle.process_connected_handle (); } handle_selection.path.update_region_boundaries (); @@ -601,8 +602,10 @@ delta_coordinate_y = coordinate_y - last_point_y; foreach (PointSelection selected in selected_points) { - selected.point.x += delta_coordinate_x; - selected.point.y += delta_coordinate_y; + selected.point.set_position (selected.point.x + delta_coordinate_x, + selected.point.y + delta_coordinate_y); + selected.point.recalculate_linear_handles (); + selected.path.update_region_boundaries (); } } else if (GridTool.has_ttf_grid ()) { coordinate_x = Glyph.path_coordinate_x (x); @@ -612,8 +615,10 @@ delta_coordinate_y = coordinate_y - last_point_y; foreach (PointSelection selected in selected_points) { - selected.point.x += delta_coordinate_x; - selected.point.y += delta_coordinate_y; + selected.point.set_position (selected.point.x + delta_coordinate_x, + selected.point.y + delta_coordinate_y); + selected.point.recalculate_linear_handles (); + selected.path.update_region_boundaries (); } } else { coordinate_x = Glyph.path_coordinate_x (x); @@ -622,8 +627,8 @@ delta_coordinate_y = coordinate_y - last_point_y; foreach (PointSelection selected in selected_points) { - selected.point.x += delta_coordinate_x; - selected.point.y += delta_coordinate_y; + selected.point.set_position (selected.point.x + delta_coordinate_x, + selected.point.y + delta_coordinate_y); selected.point.recalculate_linear_handles (); selected.path.update_region_boundaries (); @@ -1748,11 +1753,11 @@ active_handle = new EditPointHandle.empty (); if (keyval == Key.UP) { - selected_handle.move_delta_coordinate (0, -1 * Glyph.ivz ()); + selected_handle.move_delta_coordinate (0, 1 * Glyph.ivz ()); } if (keyval == Key.DOWN) { - selected_handle.move_delta_coordinate (0, 1 * Glyph.ivz ()); + selected_handle.move_delta_coordinate (0, -1 * Glyph.ivz ()); } if (keyval == Key.LEFT) {
--- a/libbirdfont/SpacingClassTab.vala +++ b/libbirdfont/SpacingClassTab.vala @@ -30,6 +30,10 @@ Gee.ArrayList<string> connections = new Gee.ArrayList<string> (); public SpacingClassTab () { + } + + public static void remove_all_spaving_classes () { + MainWindow.spacing_class_tab.classes.clear (); } public Gee.ArrayList<string> get_all_connections (string glyph) {