]> source.dussan.org Git - vaadin-framework.git/commitdiff
#8085 Do not calculate a fixed width when enabled or readonly status changes if the...
authorArtur Signell <artur.signell@itmill.com>
Thu, 12 Jan 2012 14:25:07 +0000 (14:25 +0000)
committerArtur Signell <artur.signell@itmill.com>
Thu, 12 Jan 2012 14:25:07 +0000 (14:25 +0000)
svn changeset:22610/svn branch:6.7

src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java
src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java

index 08e5328b4083eb73199c211516913ad7fb34e134..549248aab38a4178443dff40b26a1ceb9e49b018 100644 (file)
@@ -225,6 +225,10 @@ public class VPopupCalendar extends VTextualDate implements Paintable, Field,
         }\r
 \r
         if (lastReadOnlyState != readonly || lastEnabledState != isEnabled()) {\r
+            // Enabled or readonly state changed. Differences in theming might\r
+            // affect the width (for instance if the popup button is hidden) so\r
+            // we have to recalculate the width (IF the width of the field is\r
+            // fixed)\r
             updateWidth();\r
         }\r
 \r
index 56cdf05ddb0b0c6dd1e676602ab9d1c007d134b5..ee5503376e49f5ff445878d40c8ea7bb6301ec90 100644 (file)
@@ -392,10 +392,10 @@ public class VTextualDate extends VDateField implements Paintable, Field,
      * automatically adjusted by the browser.
      */
     public void updateWidth() {
-        if (isUndefinedWidth()) {
+        if (!needLayout) {
             return;
         }
-        needLayout = true;
+
         fieldExtraWidth = -1;
         iLayout(true);
     }