From 53ffb5b25e269ea3567f167cfc07b67cfd6c934a Mon Sep 17 00:00:00 2001 From: Patrick Tasse Date: Thu, 10 Sep 2015 11:04:28 -0400 Subject: [PATCH] tmf: Avoid zoom on selection range update in AbstractTimeGraphView When the selection range is updated externally, the selection is set on the time graph widget with the 'ensure visible' flag set to true. This may or may not cause the window range to be updated. The AbstractTimeGraphView unconditionally starts a zoom thread in case that the window range has changed. It should start it only if the range has changed. However since the fix to Bug 476148, if the selection update causes the window range to change, the AbstractTimeGraphView will always be notified through the ITimeGraphRangeListener callback, and this will start a zoom thread. So it is now unnecessary to worry about starting a zoom thread on handling of the TmfSelectionRangeUpdatedSignal. Additionally, in the handling of this signal, the call to method synchingToTime() is changed to use the time graph's selection time, not the one received in the signal, as the time graph may clamp the selection time according to the current time bounds. Change-Id: I9e5d1f69107f56d4940fb2a952b41cb150832635 Signed-off-by: Patrick Tasse Reviewed-on: https://git.eclipse.org/r/55670 Reviewed-by: Hudson CI Reviewed-by: Bernd Hufmann Tested-by: Bernd Hufmann --- .../tmf/ui/views/timegraph/AbstractTimeGraphView.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java index 1e31593a35..3a59f8fcaa 100644 --- a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java +++ b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java @@ -1052,9 +1052,7 @@ public abstract class AbstractTimeGraphView extends TmfView implements ITmfTimeA } else { fTimeGraphWrapper.getTimeGraphViewer().setSelectionRange(beginTime, endTime); } - startZoomThread(fTimeGraphWrapper.getTimeGraphViewer().getTime0(), fTimeGraphWrapper.getTimeGraphViewer().getTime1()); - - synchingToTime(beginTime); + synchingToTime(fTimeGraphWrapper.getTimeGraphViewer().getTime0()); } }); } -- 2.34.1