summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/itmill/toolkit/ui/AbstractComponentContainer.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/itmill/toolkit/ui/AbstractComponentContainer.java b/src/com/itmill/toolkit/ui/AbstractComponentContainer.java
index 51aca35d25..447623068d 100644
--- a/src/com/itmill/toolkit/ui/AbstractComponentContainer.java
+++ b/src/com/itmill/toolkit/ui/AbstractComponentContainer.java
@@ -233,14 +233,16 @@ public abstract class AbstractComponentContainer extends AbstractComponent
@Override
public void setHeight(float height, int unit) {
- if (getHeight() < 0 && height >= 0) {
+ float currentHeight = getHeight();
+ if (currentHeight < 0.0f && height >= 0.0f) {
// height becoming defined -> relative height childs currently
// painted undefined may become defined
// TODO this could be optimized (subtree of only those components
// which have undefined width due this component), currently just
// repaints whole
// subtree
- } else if (getHeight() >= 0 && height < 0) {
+ requestRepaintAll();
+ } else if (currentHeight >= 0 && height < 0) {
requestRepaintAll();
}
super.setHeight(height, unit);