aboutsummaryrefslogtreecommitdiffstats
path: root/libgnomecanvas/gnome-canvas.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-10-09 11:51:53 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-30 01:49:59 +0800
commit6798b256cd3a74c5bbd76071d1073b628d740ca9 (patch)
tree2ab1763b870a3fcec30f324c8aaa417ed884ad54 /libgnomecanvas/gnome-canvas.c
parentebd534357ebcba5fef130d81b3f23c00c418a444 (diff)
downloadgsoc2013-evolution-6798b256cd3a74c5bbd76071d1073b628d740ca9.tar.gz
gsoc2013-evolution-6798b256cd3a74c5bbd76071d1073b628d740ca9.tar.zst
gsoc2013-evolution-6798b256cd3a74c5bbd76071d1073b628d740ca9.zip
gnome-canvas: Remove close_enough member
It's never set, so just replace it with its default value 0 everywhere.
Diffstat (limited to 'libgnomecanvas/gnome-canvas.c')
-rw-r--r--libgnomecanvas/gnome-canvas.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libgnomecanvas/gnome-canvas.c b/libgnomecanvas/gnome-canvas.c
index f89133c9ad..f79b37e75e 100644
--- a/libgnomecanvas/gnome-canvas.c
+++ b/libgnomecanvas/gnome-canvas.c
@@ -1757,18 +1757,12 @@ gnome_canvas_group_point (GnomeCanvasItem *item,
GnomeCanvasGroup *group;
GList *list;
GnomeCanvasItem *child, *point_item;
- gint x1, y1, x2, y2;
gdouble gx, gy;
gdouble dist, best;
gint has_point;
group = GNOME_CANVAS_GROUP (item);
- x1 = cx - item->canvas->close_enough;
- y1 = cy - item->canvas->close_enough;
- x2 = cx + item->canvas->close_enough;
- y2 = cy + item->canvas->close_enough;
-
best = 0.0;
*actual_item = NULL;
@@ -1780,7 +1774,7 @@ gnome_canvas_group_point (GnomeCanvasItem *item,
for (list = group->item_list; list; list = list->next) {
child = list->data;
- if ((child->x1 > x2) || (child->y1 > y2) || (child->x2 < x1) || (child->y2 < y1))
+ if ((child->x1 > cx) || (child->y1 > cy) || (child->x2 < cx) || (child->y2 < cy))
continue;
point_item = NULL; /* cater for incomplete item implementations */
@@ -1794,8 +1788,7 @@ gnome_canvas_group_point (GnomeCanvasItem *item,
if (has_point
&& point_item
- && ((gint) (dist * item->canvas->pixels_per_unit + 0.5)
- <= item->canvas->close_enough)) {
+ && ((gint) (dist * item->canvas->pixels_per_unit + 0.5) <= 0)) {
best = dist;
*actual_item = point_item;
}
@@ -3586,7 +3579,7 @@ gnome_canvas_get_item_at (GnomeCanvas *canvas, gdouble x, gdouble y)
gnome_canvas_w2c (canvas, x, y, &cx, &cy);
dist = gnome_canvas_item_invoke_point (canvas->root, x, y, cx, cy, &item);
- if ((gint) (dist * canvas->pixels_per_unit + 0.5) <= canvas->close_enough)
+ if ((gint) (dist * canvas->pixels_per_unit + 0.5) <= 0)
return item;
else
return NULL;