aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2012-01-12 14:25:07 +0000
committerArtur Signell <artur.signell@itmill.com>2012-01-12 14:25:07 +0000
commit58c5732531666bb24722cb507607bc55a26a690f (patch)
treeeac0a55fbfeae4bd2d89b61cee96b3c583cf17ef /src
parent0923cba3588f7e23b2dedad78ecaf79c4bbfaf18 (diff)
downloadvaadin-framework-58c5732531666bb24722cb507607bc55a26a690f.tar.gz
vaadin-framework-58c5732531666bb24722cb507607bc55a26a690f.zip
#8085 Do not calculate a fixed width when enabled or readonly status changes if the width for the component is undefined
svn changeset:22610/svn branch:6.7
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java b/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java
index 08e5328b40..549248aab3 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java
@@ -225,6 +225,10 @@ public class VPopupCalendar extends VTextualDate implements Paintable, Field,
}
if (lastReadOnlyState != readonly || lastEnabledState != isEnabled()) {
+ // Enabled or readonly state changed. Differences in theming might
+ // affect the width (for instance if the popup button is hidden) so
+ // we have to recalculate the width (IF the width of the field is
+ // fixed)
updateWidth();
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java b/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java
index 56cdf05ddb..ee5503376e 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java
@@ -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);
}