When switching traces (or opening a trace for the first time) the method
synchingToTime should be called with the selection begin time, to
perform view-specific handling for the new selected time.
Change-Id: Ia1eaa248b7e6d9616bfc20375276dcc83527fb28
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/60736
Reviewed-by: Hudson CI
fEntryList.clear();
fEntryList.addAll(list);
}
fEntryList.clear();
fEntryList.addAll(list);
}
- hasEntries = fEntryList.size() != 0;
+ hasEntries = !fEntryList.isEmpty();
- if (fEntryList != fTimeGraphWrapper.getInput()) {
+ boolean inputChanged = fEntryList != fTimeGraphWrapper.getInput();
+ if (inputChanged) {
fTimeGraphWrapper.setInput(fEntryList);
/* restore the previously saved filters, if any */
fTimeGraphWrapper.setFilters(fFiltersMap.get(fTrace));
fTimeGraphWrapper.setInput(fEntryList);
/* restore the previously saved filters, if any */
fTimeGraphWrapper.setFilters(fFiltersMap.get(fTrace));
fTimeGraphWrapper.getTimeGraphViewer().setSelectionRange(selectionBeginTime, selectionEndTime, false);
fTimeGraphWrapper.getTimeGraphViewer().setStartFinishTime(startTime, endTime);
fTimeGraphWrapper.getTimeGraphViewer().setSelectionRange(selectionBeginTime, selectionEndTime, false);
fTimeGraphWrapper.getTimeGraphViewer().setStartFinishTime(startTime, endTime);
+ if (inputChanged && selectionBeginTime != SWT.DEFAULT) {
+ synchingToTime(selectionBeginTime);
+ }
+
if (fTimeGraphWrapper instanceof TimeGraphComboWrapper && !fPackDone) {
for (TreeColumn column : ((TimeGraphComboWrapper) fTimeGraphWrapper).getTreeViewer().getTree().getColumns()) {
column.pack();
if (fTimeGraphWrapper instanceof TimeGraphComboWrapper && !fPackDone) {
for (TreeColumn column : ((TimeGraphComboWrapper) fTimeGraphWrapper).getTreeViewer().getTree().getColumns()) {
column.pack();