summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2009-04-09 13:04:37 +0000
committerArtur Signell <artur.signell@itmill.com>2009-04-09 13:04:37 +0000
commit8c21a6f36ea05bfa48b34d6162bc5a2fe3fa488b (patch)
tree99fc5ed9fb92ca868d8099f27b452c7b848415b7
parent64096660cee48f80291763799fe9872bce908f43 (diff)
downloadvaadin-framework-8c21a6f36ea05bfa48b34d6162bc5a2fe3fa488b.tar.gz
vaadin-framework-8c21a6f36ea05bfa48b34d6162bc5a2fe3fa488b.zip
Merged fix for #2839 - Form should not measure borders before style names are set.
svn changeset:7382/svn branch:6.0
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/ui/IForm.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IForm.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IForm.java
index 0b91268d25..1639b6693b 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IForm.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IForm.java
@@ -75,11 +75,10 @@ public class IForm extends ComplexPanel implements Container {
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
rendering = true;
-
+ boolean measure = false;
if (this.client == null) {
this.client = client;
- borderPaddingVertical = getOffsetHeight();
- borderPaddingHorizontal = getOffsetWidth() - desc.getOffsetWidth();
+ measure = true;
}
if (client.updateComponent(this, uidl, false)) {
@@ -87,6 +86,14 @@ public class IForm extends ComplexPanel implements Container {
return;
}
+ if (measure) {
+ // Measure the border when the style names have been set
+ borderPaddingVertical = getOffsetHeight();
+ int ow = getOffsetWidth();
+ int dow = desc.getOffsetWidth();
+ borderPaddingHorizontal = ow - dow;
+ }
+
boolean legendEmpty = true;
if (uidl.hasAttribute("caption")) {
DOM.setInnerText(caption, uidl.getStringAttribute("caption"));