summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 96b1449)
raw | patch | inline | side by side (parent: 96b1449)
author | Michael Wybrow <mjwybrow@users.sf.net> | |
Fri, 13 Aug 2010 05:22:17 +0000 (15:22 +1000) | ||
committer | Michael Wybrow <mjwybrow@users.sf.net> | |
Fri, 13 Aug 2010 05:22:17 +0000 (15:22 +1000) |
to the perimeter of two overlapping objects) could crash the connector
context.
context.
src/connector-context.cpp | patch | blob | history |
index 3791034d69687723af5243335d93802e29710f0b..1263a9215086a068821fcbcf8179cca754d78f2b 100644 (file)
if (cc->active_conn == item)
{
- // Just adjust handle positions.
- Geom::Point startpt = *(curve->first_point()) * i2d;
- sp_knot_set_position(cc->endpt_handle[0], startpt, 0);
+ if (curve->is_empty())
+ {
+ // Connector is invisible because it is clipped to the boundary of
+ // two overlpapping shapes.
+ sp_knot_hide(cc->endpt_handle[0]);
+ sp_knot_hide(cc->endpt_handle[1]);
+ }
+ else
+ {
+ // Just adjust handle positions.
+ Geom::Point startpt = *(curve->first_point()) * i2d;
+ sp_knot_set_position(cc->endpt_handle[0], startpt, 0);
- Geom::Point endpt = *(curve->last_point()) * i2d;
- sp_knot_set_position(cc->endpt_handle[1], endpt, 0);
+ Geom::Point endpt = *(curve->last_point()) * i2d;
+ sp_knot_set_position(cc->endpt_handle[1], endpt, 0);
+ }
return;
}
G_CALLBACK(endpt_handler), cc);
}
+ if (curve->is_empty())
+ {
+ // Connector is invisible because it is clipped to the boundary
+ // of two overlpapping shapes. So, it doesn't need endpoints.
+ return;
+ }
+
Geom::Point startpt = *(curve->first_point()) * i2d;
sp_knot_set_position(cc->endpt_handle[0], startpt, 0);