Commit c4d31185 authored by Nathan Lee's avatar Nathan Lee
Browse files

Stop Connector tool avoidance crash in flatpak

Cherry-pick from 6a717e67 (1.0alpha)
parent 1a07842b
Pipeline #61058387 passed with stages
in 9 minutes and 53 seconds
......@@ -293,14 +293,18 @@ static Avoid::Polygon avoid_item_poly(SPItem const *item)
// store expanded convex hull in Avoid::Polygn
Avoid::Polygon poly;
Geom::Line hull_edge(hull[-1], hull[0]);
Geom::Line hull_edge(hull.back(), hull.front());
Geom::Line prev_parallel_hull_edge;
prev_parallel_hull_edge.setOrigin(hull_edge.origin()+hull_edge.versor().ccw()*spacing);
prev_parallel_hull_edge.setVector(hull_edge.versor());
int hull_size = hull.size();
for (int i = 0; i < hull_size; ++i)
{
hull_edge.setPoints(hull[i], hull[i+1]);
if (i + 1 == hull_size) {
hull_edge.setPoints(hull.back(), hull.front());
} else {
hull_edge.setPoints(hull[i], hull[i + 1]);
}
Geom::Line parallel_hull_edge;
parallel_hull_edge.setOrigin(hull_edge.origin()+hull_edge.versor().ccw()*spacing);
parallel_hull_edge.setVector(hull_edge.versor());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment