From: buliabyak <> Date: Sun, 28 Mar 2010 03:15:37 +0000 (-0300) Subject: reinstate wrongly ignored delta in pick; makes selecting small text objects much... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=19c5085e24daef91a74f169e3b62650299307bd2;p=inkscape.git reinstate wrongly ignored delta in pick; makes selecting small text objects much easier --- diff --git a/src/display/nr-arena-glyphs.cpp b/src/display/nr-arena-glyphs.cpp index db0922915..ff320bd81 100644 --- a/src/display/nr-arena-glyphs.cpp +++ b/src/display/nr-arena-glyphs.cpp @@ -234,7 +234,7 @@ nr_arena_glyphs_clip(NRArenaItem *item, NRRectL */*area*/, NRPixBlock */*pb*/) } static NRArenaItem * -nr_arena_glyphs_pick(NRArenaItem *item, Geom::Point p, gdouble /*delta*/, unsigned int /*sticky*/) +nr_arena_glyphs_pick(NRArenaItem *item, Geom::Point p, gdouble delta, unsigned int /*sticky*/) { NRArenaGlyphs *glyphs; @@ -246,7 +246,7 @@ nr_arena_glyphs_pick(NRArenaItem *item, Geom::Point p, gdouble /*delta*/, unsign double const x = p[Geom::X]; double const y = p[Geom::Y]; /* With text we take a simple approach: pick if the point is in a characher bbox */ - if ((x >= item->bbox.x0) && (y >= item->bbox.y0) && (x <= item->bbox.x1) && (y <= item->bbox.y1)) return item; + if ((x + delta >= item->bbox.x0) && (y + delta >= item->bbox.y0) && (x - delta <= item->bbox.x1) && (y - delta <= item->bbox.y1)) return item; return NULL; }