Commit fc8557d1 authored by Jabier Arraiza's avatar Jabier Arraiza Committed by Jabier Arraiza

When apply offset LPE to groups crash

Remove the use of sp-shape on a group


(cherry picked from commit d9af66c3)
parent 229008a1
Pipeline #144574779 failed with stages
in 88 minutes and 43 seconds
......@@ -541,19 +541,21 @@ Geom::Point KnotHolderEntityOffsetPoint::knot_get() const
return lpe->offset_pt;
}
Geom::Point nearest = lpe->offset_pt;
Geom::PathVector out = SP_SHAPE(item)->getCurve(true)->get_pathvector();
if (lpe->offset_pt == Geom::Point(Geom::infinity(), Geom::infinity())) {
if (group) {
nearest = Geom::Point(lpe->boundingbox_X.min(), lpe->boundingbox_Y.min());
} else {
Geom::PathVector out = SP_SHAPE(item)->getCurve(true)->get_pathvector();
nearest = lpe->get_default_point(out);
boost::optional<Geom::PathVectorTime> pathvectortime = out.nearestTime(nearest);
if (pathvectortime) {
Geom::PathTime pathtime = pathvectortime->asPathTime();
nearest = out[(*pathvectortime).path_index].pointAt(pathtime.curve_index + pathtime.t);
}
}
}
boost::optional<Geom::PathVectorTime> pathvectortime = out.nearestTime(nearest);
if (pathvectortime) {
Geom::PathTime pathtime = pathvectortime->asPathTime();
nearest = out[(*pathvectortime).path_index].pointAt(pathtime.curve_index + pathtime.t);
}
return nearest;
}
......
Markdown is supported
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