The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix merge code on Windows and Mac OS X

These changes was commited to the Birdfont repository Fri, 28 Aug 2015 10:27:13 +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, 28 Aug 2015 10:27:13 +0000 (12:27 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 28 Aug 2015 10:27:13 +0000 (12:27 +0200)
commit 623a82aa444ea08d6360fe889b761fa478ff026c
tree f7fb2836b67c365d56c86942f0d689b2077412a4
parent 0c8e3283ff5ab62de211ede73c59125ad55a2ce6
Fix merge code on Windows and Mac OS X

libbirdfont/MenuTab.vala
libbirdfont/StrokeTool.vala
--- a/libbirdfont/MenuTab.vala +++ b/libbirdfont/MenuTab.vala @@ -152,6 +152,12 @@ } background_thread = e; suppress_event = e; + + // key up for all modifiers will be ignored if events are suppressed + if (suppress_event) { + KeyBindings.reset (); + } + return true; }
--- a/libbirdfont/StrokeTool.vala +++ b/libbirdfont/StrokeTool.vala @@ -1762,8 +1762,8 @@ Path.find_intersection_point (ep, next, p1, p2, out cross_x, out cross_y); - if (fmin (ep.x, next.x) <= cross_x <= fmax (ep.x, next.x) - && fmin (ep.y, next.y) <= cross_y <= fmax (ep.y, next.y)) { + if (fmin (ep.x, next.x) - 0.00001 <= cross_x <= fmax (ep.x, next.x) + 0.00001 + && fmin (ep.y, next.y) - 0.00001 <= cross_y <= fmax (ep.y, next.y) + 0.00001) { // iterate to find intersection. if (is_line (ep.x, ep.y, cross_x, cross_y, next.x, next.y) && is_line (p1.x, p1.y, cross_x, cross_y, p2.x, p2.y)) { @@ -1842,8 +1842,8 @@ /** @return true if p2 is on the line p1 to p3 */ static bool is_line (double x1, double y1, double x2, double y2, double x3, double y3, double tolerance = 0.01) { - return fmin (x1, x3) <= x2 && x2 <= fmax (x1, x3) - && fmin (y1, y3) <= y2 && y2 <= fmax (y1, y3) + return fmin (x1, x3) - 0.00001 <= x2 && x2 <= fmax (x1, x3) + 0.00001 + && fmin (y1, y3) - 0.00001 <= y2 && y2 <= fmax (y1, y3) + 0.00001 && is_flat (x1, y1, x2, y2, x3, y3, tolerance); }