When the window range is less than the display width, the resolution was
then equal to 0. The time event was not shown until the user change the
zoom level. Now we set the resolution value to 1 instead of 0.
Change-Id: I4f0ae39576c452f0bdfbaf23b836f3af758f0b91
Signed-off-by: Jean-Christian Kouame <jean-christian.kouame@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/87339
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
}
private void buildStatusEvent(XmlEntry traceEntry, @NonNull IProgressMonitor monitor, long start, long end) {
- long resolution = (end - start) / getDisplayWidth();
+ long resolution = Math.max((end - start) / getDisplayWidth(), 1);
long startTime = Math.max(start, traceEntry.getStartTime());
long endTime = Math.min(end + 1, traceEntry.getEndTime());
List<ITimeEvent> eventList = getEventList(traceEntry, startTime, endTime, resolution, monitor);