summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbuliabyak <>2010-03-28 03:15:37 +0000
committerbuliabyak <>2010-03-28 03:15:37 +0000
commit440056330d258d3b66a5a4625848c5e9e230a6f1 (patch)
tree8d45a3b8519e9347369d9f291e05979d1e988de3 /src
parentPhase 3 - Convert to C++ class, but still using C-style callbacks and signals. (diff)
downloadinkscape-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.cpp4
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;
}