From: Patrick Tasse Date: Wed, 22 Aug 2012 18:19:35 +0000 (-0400) Subject: Fix context location after first event seek. X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=7f0bab0787233dab2ca0fff9d55d81ba8c27f5d7;p=deliverable%2Ftracecompass.git 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 --- 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); }