tmf: Fix value of time offset in XY chart viewer being wrong for a while
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Mon, 27 Apr 2015 19:00:08 +0000 (15:00 -0400)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tue, 28 Apr 2015 19:14:31 +0000 (15:14 -0400)
commit4e72adee07e93ad3329cf050defbb17104c33794
tree32ffd2be6a72cde95889da0ccd09e2659cf51001
parent51173fa195167decc178350d4d7150c5d09a4df8
tmf: Fix value of time offset in XY chart viewer being wrong for a while

Right after calling setWindowStartTime/setWindowEndTime, the value of
getTimeOffset was wrong until setTimeOffset was called later, in a data
building thread for example.

Since the time offset is deduced from the start time (startTime - 1), we can
remove this field and setter. This means that the time offset will always be
consistent with the start time. Similarly, the window duration can be deduced
(startTime - endTime) therefore we can remove this setting and field as well.

An example of how this bug can manifest itself is inside a resize listener.
If both windowStartTime and timeOffset are used to calculate the position of a
value on the chart, since the timeOffset can be inconsistent, the position
would be wrong.

Change-Id: If59a9d2c0dfc24245949f8ba693dd89e6498820f
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/46591
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/TmfTimeViewer.java
org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/xycharts/TmfXYChartViewer.java
org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/xycharts/barcharts/TmfBarChartViewer.java
org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/xycharts/linecharts/TmfCommonXLineChartViewer.java
This page took 0.031794 seconds and 5 git commands to generate.