tmf: Fix time alignment not occurring when switching perspective
authorPatrick Tasse <patrick.tasse@gmail.com>
Fri, 4 Nov 2016 14:50:54 +0000 (10:50 -0400)
committerPatrick Tasse <patrick.tasse@gmail.com>
Wed, 9 Nov 2016 22:14:08 +0000 (17:14 -0500)
When switching perspective, the view can be resized just before it is
made visible. Queue the time alignment to ensure it occurs when the
parent composite is visible.

Change-Id: I6f4779bf0be59de703fadaacf549b28e823bd7c7
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/84474
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/TmfView.java

index f073027a660d920c80f6719f583ae03340f26124..c9a3ab3cc01a13bd596c0858c46c0fae283afdbe 100644 (file)
@@ -141,7 +141,14 @@ public abstract class TmfView extends ViewPart implements ITmfComponent {
             fControlListener = new ControlAdapter() {
                 @Override
                 public void controlResized(ControlEvent e) {
-                    TIME_ALIGNMENT_SYNCHRONIZER.handleViewResized(TmfView.this);
+                    /*
+                     * When switching perspective, the view can be resized just
+                     * before it is made visible. Queue the time alignment to
+                     * ensure it occurs when the parent composite is visible.
+                     */
+                    e.display.asyncExec(() -> {
+                        TIME_ALIGNMENT_SYNCHRONIZER.handleViewResized(TmfView.this);
+                    });
                 }
             };
             parent.addControlListener(fControlListener);
This page took 0.024563 seconds and 5 git commands to generate.