From 63b1425aa6efaf3a5d229a13e5b2fdfd2535238b Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 30 Nov 2010 13:40:50 +0000 Subject: Additional fix for #6075 - CellBasedLayout does not update size correctly when set from client side svn changeset:16232/svn branch:6.5 --- .../vaadin/terminal/gwt/client/ui/VOrderedLayout.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/com') diff --git a/src/com/vaadin/terminal/gwt/client/ui/VOrderedLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VOrderedLayout.java index 2ceeb3366b..6989e09738 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VOrderedLayout.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VOrderedLayout.java @@ -8,6 +8,7 @@ import java.util.Iterator; import java.util.Set; import com.google.gwt.core.client.JsArrayString; +import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.event.dom.client.DomEvent.Type; import com.google.gwt.event.shared.EventHandler; import com.google.gwt.event.shared.HandlerRegistration; @@ -647,15 +648,19 @@ public class VOrderedLayout extends CellBasedLayout { } private void setOuterLayoutWidth(int activeLayoutWidth) { - super.setWidth((activeLayoutWidth + activeMargins.getHorizontal()) - + "px"); - + // Don't call setWidth to avoid triggering all kinds of recalculations + // Also don't call super.setWidth to avoid messing with the + // dynamicWidth property + int newPixelWidth = (activeLayoutWidth + activeMargins.getHorizontal()); + getElement().getStyle().setWidth(newPixelWidth, Unit.PX); } private void setOuterLayoutHeight(int activeLayoutHeight) { - super.setHeight((activeLayoutHeight + activeMargins.getVertical()) - + "px"); - + // Don't call setHeight to avoid triggering all kinds of recalculations + // Also don't call super.setHeight to avoid messing with the + // dynamicHeight property + int newPixelHeight = (activeLayoutHeight + activeMargins.getVertical()); + getElement().getStyle().setHeight(newPixelHeight, Unit.PX); } /** -- cgit v1.2.3