tmf: Bug 500542: Missing zoomed events in time graph entry
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / tmf / ui / widgets / timegraph / model / TimeGraphEntry.java
index 4ddb9a1d04866bd2ba29a894cf3d31bcf39520fb..8f36276a5ef45b8f47e970872b4e649b308b8abc 100644 (file)
@@ -221,6 +221,8 @@ public class TimeGraphEntry implements ITimeGraphEntry {
      * starts at the same time as the event to add, it is replaced by the new
      * event. If the new event starts before the zoomed event list's last event,
      * the new event is ignored and is assumed to be already part of the list.
+     * If the new event starts before the zoomed event list's first event, the
+     * list is assumed to be incomplete and is cleared, and the event is added.
      *
      * @param event
      *            The time event to add
@@ -235,6 +237,9 @@ public class TimeGraphEntry implements ITimeGraphEntry {
             fZoomedEventList.add(event);
         } else if (start == lastStart) {
             fZoomedEventList.set(lastIndex, event);
+        } else if (start < fZoomedEventList.get(0).getTime()) {
+            fZoomedEventList.clear();
+            fZoomedEventList.add(event);
         }
         if (event instanceof NullTimeEvent) {
             /* A NullTimeEvent should not affect the entry bounds */
This page took 0.024945 seconds and 5 git commands to generate.