From: Patrick Tasse Date: Mon, 30 May 2016 14:49:17 +0000 (-0400) Subject: tmf: Bug 494589: Event table loses focus when pressing Ctrl+Enter or Esc X-Git-Url: http://git.efficios.com/?p=deliverable%2Ftracecompass.git;a=commitdiff_plain;h=d6d59bfabdcf02b14b8e8f244c7789a32dd28b0b tmf: Bug 494589: Event table loses focus when pressing Ctrl+Enter or Esc This gives back focus to the table after pressing Ctrl+Enter or Esc from a header row cell editor. Change-Id: I85fe91739a0b4422de3168dd9ea2fbb197853a6b Signed-off-by: Patrick Tasse Reviewed-on: https://git.eclipse.org/r/73953 Reviewed-by: Hudson CI Reviewed-by: Matthew Khouzam Tested-by: Matthew Khouzam --- diff --git a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/events/TmfEventsTable.java b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/events/TmfEventsTable.java index 3fb761e788..dd863abdba 100644 --- a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/events/TmfEventsTable.java +++ b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/events/TmfEventsTable.java @@ -1796,15 +1796,15 @@ public class TmfEventsTable extends TmfComponent implements IGotoMarker, IColorS applyHeader(); if ((e.stateMask & SWT.CTRL) != 0) { applySearchAsFilter(); - } else { - /* - * Set focus on the table so that the next - * carriage return goes to the next result - */ - TmfEventsTable.this.getTable().setFocus(); } + /* + * Set focus on the table so that the next + * carriage return goes to the next result + */ + TmfEventsTable.this.getTable().setFocus(); } else if (e.character == SWT.ESC) { tableEditor.getEditor().dispose(); + TmfEventsTable.this.getTable().setFocus(); } } });