From 7f0bab0787233dab2ca0fff9d55d81ba8c27f5d7 Mon Sep 17 00:00:00 2001 From: Patrick Tasse Date: Wed, 22 Aug 2012 14:19:35 -0400 Subject: [PATCH] Fix context location after first event seek. Change-Id: I84205cede4cf7d3a4f561b61cbcbf0812fece512 Reviewed-on: https://git.eclipse.org/r/7353 Reviewed-by: Matthew Khouzam IP-Clean: Matthew Khouzam Tested-by: Matthew Khouzam --- .../eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java index dcf21ed4df..e1b4ae0fec 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java @@ -214,6 +214,12 @@ public class CtfTmfTrace extends TmfTrace implements ITmfEventParser{ currentLocation.setLocation(getEndTime().getValue() + 1, 0L); } context.setLocation(currentLocation); + if (location == null) { + CtfTmfEvent event = getIterator(this, context).getCurrentEvent(); + if (event != null) { + currentLocation.setLocation(event.getTimestampValue(), 0); + } + } if(context.getRank() != 0) { context.setRank(ITmfContext.UNKNOWN_RANK); } -- 2.34.1