summaryrefslogtreecommitdiffstats
path: root/grapher/GraphStyle.cxx
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-12-22 15:06:17 +0100
committerTim Moore <timoore@redhat.com>2009-12-23 00:08:13 +0100
commit33dc14f9790c82669f48abe40662bee1314f5741 (patch)
treed8c009853967a802c57f2efe928e57c29e51d74f /grapher/GraphStyle.cxx
parentc8985e919ed67b39f86a3070a0366a1f2d19f519 (diff)
downloadsystemtap-steved-33dc14f9790c82669f48abe40662bee1314f5741.tar.gz
systemtap-steved-33dc14f9790c82669f48abe40662bee1314f5741.tar.xz
systemtap-steved-33dc14f9790c82669f48abe40662bee1314f5741.zip
grapher: fix bug in looking up event under pointer
I don't why I thought this ever worked. * grapher/GraphStyle.cxx (GraphStyleEvent::dataIndexAtPoint): return distance from beginning of buffer, not beginning of search bounds.
Diffstat (limited to 'grapher/GraphStyle.cxx')
-rw-r--r--grapher/GraphStyle.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/grapher/GraphStyle.cxx b/grapher/GraphStyle.cxx
index 6bf4e109..5a6621bd 100644
--- a/grapher/GraphStyle.cxx
+++ b/grapher/GraphStyle.cxx
@@ -184,7 +184,7 @@ ssize_t GraphStyleEvent::dataIndexAtPoint(double x, double y,
double xrect = (*ditr - left) * horizScale - 1.5 * graph->_lineWidth;
if (xrect <= xgraph && xgraph < xrect + 3.0 * graph->_lineWidth
&& yrect <= ygraph && ygraph < yrect + 3.0 * graph->_lineWidth)
- return static_cast<ssize_t>(distance(lower, ditr));
+ return static_cast<ssize_t>(distance(graphData->times.begin(), ditr));
}
return -1;
}