Bug 566375 - Disappearing 'View Menu' toolbar button in History view - Part 2 Forcing the UI update of the topright had has side effect that the toolbar is not rendered at the correct location. When first updating the toolbar and then forcing the UI update, the toolbar is correctly renderer. The forced UI update causes another flicker of the toolbar. This is prevented by disabling redraw while repositioning the toolbar. Change-Id: Iaceb41965f787f554139779300f7da11455c32f2 Signed-off-by: Rolf Theunissen <rolf.theunissen@gmail.com>
diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java index f2e67f4..5512593 100644 --- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java +++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java
@@ -741,8 +741,13 @@ } // Pack the result - trComp.pack(); - trComp.requestLayout(); + try { + trComp.setRedraw(false); + trComp.pack(); + trComp.requestLayout(); + } finally { + trComp.setRedraw(true); + } updateMRUValue(tabFolder); }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ActionBars.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ActionBars.java index 3381f6b..8ecee77 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ActionBars.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ActionBars.java
@@ -62,15 +62,7 @@ @Override public void updateActionBars() { - // FIXME compat: updateActionBars : should do something useful getStatusLineManager().update(false); - if (menuManager != null) { - menuManager.update(false); - - // Changes in the menuManager are not propagated to the E4 model, forcing UI - // update to properly show the view menu, see Bug 566375 - forceUpdateTopRight(); - } if (toolbarManager != null) { toolbarManager.update(true); @@ -85,6 +77,14 @@ } } + if (menuManager != null) { + menuManager.update(false); + + // Changes in the menuManager are not propagated to the E4 model, forcing UI + // update to properly show the view menu, see Bug 566375 + forceUpdateTopRight(); + } + super.updateActionBars(); }