The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Don't redraw toolbox when points are selected

These changes was commited to the Birdfont repository Fri, 24 Apr 2015 15:32:22 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Fri, 24 Apr 2015 15:32:22 +0000]

Updated Files

libbirdfont/DrawingTools.vala
libbirdfont/PenTool.vala
libbirdfont/Toolbox.vala
--- a/libbirdfont/DrawingTools.vala +++ b/libbirdfont/DrawingTools.vala @@ -1074,7 +1074,7 @@ } add_stroke.selected = stroke; - Toolbox.redraw_tool_box (); + // Too slow. Toolbox.redraw_tool_box (); } void auto_trace_background () {
--- a/libbirdfont/PenTool.vala +++ b/libbirdfont/PenTool.vala @@ -76,7 +76,7 @@ public static double simplification_threshold = 0.5; public static bool retain_angle = false; - + public PenTool (string name) { base (name, t_("Add new points")); @@ -96,22 +96,23 @@ select_action.connect ((self) => { }); - press_action.connect ((self, b, x, y) => { + press_action.connect ((self, b, x, y) => { // retain path direction clockwise = new Gee.ArrayList<Path> (); counter_clockwise = new Gee.ArrayList<Path> (); begin_action_x = x; begin_action_y = y; - + update_orientation (); - + first_move_action = true; last_point_x = Glyph.path_coordinate_x (x); last_point_y = Glyph.path_coordinate_y (y); move_action (this, x, y); + press (b, x, y, false); if (BirdFont.android) { @@ -186,7 +187,7 @@ if (Path.distance (begin_action_x, x, begin_action_y, y) > 10 * MainWindow.units) { point_selection_image = false; } - + move (x, y); }); @@ -531,7 +532,7 @@ } } g.close_path (); - g.redraw_area (0, 0, g.allocation.width, g.allocation.height); + GlyphCanvas.redraw (); } public void set_precision (double p) { @@ -1370,7 +1371,7 @@ } if (redraw) { - g.redraw_area (0, 0, g.allocation.width, g.allocation.height); + GlyphCanvas.redraw (); } } @@ -1737,7 +1738,7 @@ } set_selected_point (next.point, next.path); - g.redraw_area (0, 0, g.allocation.width, g.allocation.height); + GlyphCanvas.redraw (); } private static PointSelection get_next_point (double angle) @@ -1882,7 +1883,7 @@ } // TODO: redraw only the relevant parts - g.redraw_area (0, 0, g.allocation.width, g.allocation.height); + GlyphCanvas.redraw (); } public static void convert_point_to_line (EditPoint ep, bool both) {
--- a/libbirdfont/Toolbox.vala +++ b/libbirdfont/Toolbox.vala @@ -467,7 +467,6 @@ cr.restore (); draw_tool_tip (cr); - } private void draw_tool_tip (Context cr) {