diff options
author | Artur Signell <artur.signell@itmill.com> | 2010-11-30 13:40:50 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2010-11-30 13:40:50 +0000 |
commit | 63b1425aa6efaf3a5d229a13e5b2fdfd2535238b (patch) | |
tree | 06aeaf7de15ae770b01019e2b00ba90e36213e42 /src/com | |
parent | 7a7cb2cdbda568d380a3cf4a8b1084e2d059c758 (diff) | |
download | vaadin-framework-63b1425aa6efaf3a5d229a13e5b2fdfd2535238b.tar.gz vaadin-framework-63b1425aa6efaf3a5d229a13e5b2fdfd2535238b.zip |
Additional fix for #6075 - CellBasedLayout does not update size correctly when set from client side
svn changeset:16232/svn branch:6.5
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VOrderedLayout.java | 17 |
1 files changed, 11 insertions, 6 deletions
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); } /** |