Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2015-05-03 19:18:08 +0000
committerAndrey Loskutov2015-05-12 18:50:33 +0000
commiteeb7a74f1699f48df5de1ced578ff14e8f05ca08 (patch)
tree3520fb4981ff9680ecb02cd32ee1b8a325c5aa79
parent0eb53461273e4ac4a83873ba9763e66aa9f93e50 (diff)
downloadeclipse.platform.ui-eeb7a74f1699f48df5de1ced578ff14e8f05ca08.tar.gz
eclipse.platform.ui-eeb7a74f1699f48df5de1ced578ff14e8f05ca08.tar.xz
eclipse.platform.ui-eeb7a74f1699f48df5de1ced578ff14e8f05ca08.zip
Bug 466233 - Toolbar items are wrongly rendered into a "drop-down"I20150512-2100I20150512-2000
Change-Id: I1688e0cbe9abb600079c40d0645e291438eb6f3f Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/TrimBarLayout.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/TrimBarLayout.java b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/TrimBarLayout.java
index c610136cf0b..19cce1e5aa5 100644
--- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/TrimBarLayout.java
+++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/TrimBarLayout.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 IBM Corporation and others.
+ * Copyright (c) 2011, 2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* Christian Walther (Indel AG) - Bug 399458: Fix layout overlap in line-wrapped trim bar
* Christian Walther (Indel AG) - Bug 389012: Fix division by zero in TrimBarLayout
+ * Marc-Andre Laperle (Ericsson) - Bug 466233: Toolbar items are wrongly rendered into a "drop-down"
*******************************************************************************/
package org.eclipse.e4.ui.workbench.renderers.swt;
@@ -86,8 +87,10 @@ public class TrimBarLayout extends Layout {
@Override
protected Point computeSize(Composite composite, int wHint, int hHint,
boolean flushCache) {
- // Clear the current cache
- lines.clear();
+ if (flushCache) {
+ // Clear the current cache
+ lines.clear();
+ }
// First, hide any empty toolbars
MTrimBar bar = (MTrimBar) composite
@@ -195,6 +198,10 @@ public class TrimBarLayout extends Layout {
@Override
protected void layout(Composite composite, boolean flushCache) {
+ if (flushCache) {
+ // Clear the current cache
+ lines.clear();
+ }
Rectangle bounds = composite.getBounds();
// offset the rectangle to allow for the margins

Back to the top