diff options
Diffstat (limited to 'src/draw-anchor.cpp')
| -rw-r--r-- | src/draw-anchor.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/draw-anchor.cpp b/src/draw-anchor.cpp index c9bc5485e..62a091608 100644 --- a/src/draw-anchor.cpp +++ b/src/draw-anchor.cpp @@ -71,8 +71,6 @@ SPDrawAnchor *sp_draw_anchor_destroy(SPDrawAnchor *anchor) return NULL; } -#define A_SNAP 4.0 - /** * Test if point is near anchor, if so fill anchor on canvas and return * pointer to it or NULL. @@ -80,8 +78,9 @@ SPDrawAnchor *sp_draw_anchor_destroy(SPDrawAnchor *anchor) SPDrawAnchor *sp_draw_anchor_test(SPDrawAnchor *anchor, Geom::Point w, gboolean activate) { SPDesktop *dt = SP_EVENT_CONTEXT_DESKTOP(anchor->dc); + SPCtrl *ctrl = SP_CTRL(anchor->ctrl); - if ( activate && ( Geom::LInfty( w - dt->d2w(anchor->dp) ) <= A_SNAP ) ) { + if ( activate && ( Geom::LInfty( w - dt->d2w(anchor->dp) ) <= (ctrl->box.width() / 2.0) ) ) { if (!anchor->active) { sp_canvas_item_set((GtkObject *) anchor->ctrl, "fill_color", FILL_COLOR_MOUSEOVER, NULL); anchor->active = TRUE; |
