Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Tasse2019-07-15 14:52:05 -0400
committerPatrick Tasse2019-07-15 16:33:49 -0400
commit3ace8d922d4d9bb88ce276f6389b660591bb3af8 (patch)
tree32903bcbca9c68031b83cf53c6576d4b29680906
parenteb38078ce18698611bf6f7d57655fd49c2df0706 (diff)
downloadorg.eclipse.tracecompass-master.tar.gz
org.eclipse.tracecompass-master.tar.xz
org.eclipse.tracecompass-master.zip
tmf: Bug 549288: Missing marker tool tip when zoomed inHEADmaster
Change-Id: Icf047b002790443acb1ef7349278e1e6c1baeb40 Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com> Reviewed-on: https://git.eclipse.org/r/146111 Reviewed-by: Simon Delisle <simon.delisle@ericsson.com> Tested-by: CI Bot
-rw-r--r--tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/widgets/TimeGraphTooltipHandler.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/widgets/TimeGraphTooltipHandler.java b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/widgets/TimeGraphTooltipHandler.java
index 5d442da127..a73a67c168 100644
--- a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/widgets/TimeGraphTooltipHandler.java
+++ b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/widgets/TimeGraphTooltipHandler.java
@@ -129,7 +129,7 @@ public class TimeGraphTooltipHandler extends TmfAbstractToolTipHandler {
List<IMarkerEvent> markers = timeGraphControl.getMarkers();
List<IMarkerEvent> retVal = new ArrayList<>();
if (markers != null) {
- // Minimum of 5 pixels for the dead zone
+ // Include markers up to 5 pixels left and right of cursor
int fuzz = 5;
long fuzzStart = timeGraphControl.getTimeAtX(pt.x - fuzz);
long fuzzEnd = timeGraphControl.getTimeAtX(pt.x + fuzz);
@@ -138,7 +138,7 @@ public class TimeGraphTooltipHandler extends TmfAbstractToolTipHandler {
long duration = marker.getDuration();
long startTime = marker.getTime();
long endTime = startTime + duration;
- if ((startTime < fuzzEnd) && (endTime > fuzzStart)) {
+ if ((startTime <= fuzzEnd) && (endTime >= fuzzStart)) {
retVal.add(marker);
}
}

Back to the top