diff options
Diffstat (limited to 'source/blender/editors/space_logic/logic_buttons.c')
-rw-r--r-- | source/blender/editors/space_logic/logic_buttons.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_logic/logic_buttons.c b/source/blender/editors/space_logic/logic_buttons.c index 1595889f596..abffb955405 100644 --- a/source/blender/editors/space_logic/logic_buttons.c +++ b/source/blender/editors/space_logic/logic_buttons.c @@ -84,10 +84,10 @@ static int cut_links_intersect(uiLinkLine *line, float mcoords[][2], int tot) int i, b; rcti rectlink; - rectlink.xmin = (int) (line->from->x1 + line->from->x2) / 2; - rectlink.ymin = (int) (line->from->y1 + line->from->y2) / 2; - rectlink.xmax = (int) (line->to->x1 + line->to->x2) / 2; - rectlink.ymax = (int) (line->to->y1 + line->to->y2) / 2; + rectlink.xmin = (int)BLI_RCT_CENTER_X(&line->from->rect); + rectlink.ymin = (int)BLI_RCT_CENTER_Y(&line->from->rect); + rectlink.xmax = (int)BLI_RCT_CENTER_X(&line->to->rect); + rectlink.ymax = (int)BLI_RCT_CENTER_Y(&line->to->rect); if (ui_link_bezier_points(&rectlink, coord_array, LINK_RESOL)) { for (i=0; i<tot-1; i++) |