diff options
| author | buliabyak <> | 2010-03-28 03:15:37 +0000 |
|---|---|---|
| committer | buliabyak <> | 2010-03-28 03:15:37 +0000 |
| commit | 440056330d258d3b66a5a4625848c5e9e230a6f1 (patch) | |
| tree | 8d45a3b8519e9347369d9f291e05979d1e988de3 /src | |
| parent | Phase 3 - Convert to C++ class, but still using C-style callbacks and signals. (diff) | |
| download | inkscape-440056330d258d3b66a5a4625848c5e9e230a6f1.tar.gz inkscape-440056330d258d3b66a5a4625848c5e9e230a6f1.zip | |
reinstate wrongly ignored delta in pick; makes selecting small text objects much easier
(bzr r9245)
Diffstat (limited to 'src')
| -rw-r--r-- | src/display/nr-arena-glyphs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |
