]> source.dussan.org Git - vaadin-framework.git/commitdiff
Repaint children when parent becomes visible
authorArtur Signell <artur@vaadin.com>
Tue, 20 Mar 2012 12:30:21 +0000 (14:30 +0200)
committerArtur Signell <artur@vaadin.com>
Wed, 21 Mar 2012 13:28:03 +0000 (15:28 +0200)
src/com/vaadin/ui/AbstractComponentContainer.java

index 01b5a7ad4cace5842eeb546b6181dbe1729c431f..66e7c180471bfcf4f14ee6c0812749071f44f851 100644 (file)
@@ -225,6 +225,19 @@ public abstract class AbstractComponentContainer extends AbstractComponent
         }
     }
 
+    @Override
+    public void setVisible(boolean visible) {
+        if (getState().isVisible() == visible) {
+            return;
+        }
+
+        super.setVisible(visible);
+        // If the visibility state is toggled it might affect all children
+        // aswell, e.g. make container visible should make children visible if
+        // they were only hidden because the container was hidden.
+        requestRepaintAll();
+    }
+
     @Override
     public void setWidth(float width, Unit unit) {
         /*