]> source.dussan.org Git - vaadin-framework.git/commitdiff
Redefine isVisible to not paint dirty detached component (#6690)
authorLeif Åstrand <leif@vaadin.com>
Tue, 29 May 2012 13:47:04 +0000 (16:47 +0300)
committerLeif Åstrand <leif@vaadin.com>
Wed, 6 Jun 2012 06:33:13 +0000 (09:33 +0300)
src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java

index 186126c9c6a4911373cdf14afb7e0060d842fc7d..15b148ce7fb71ac4ea1a25aaadc760e9c74b8139 100644 (file)
@@ -1255,9 +1255,17 @@ public abstract class AbstractCommunicationManager implements Serializable {
      * @return true if the child is visible to the client, false otherwise
      */
     static boolean isVisible(Component child) {
+        if (!child.isVisible()) {
+            return false;
+        }
+
         HasComponents parent = child.getParent();
-        if (parent == null || !child.isVisible()) {
-            return child.isVisible();
+        if (parent == null) {
+            if (child instanceof Root) {
+                return child.isVisible();
+            } else {
+                return false;
+            }
         }
 
         return parent.isComponentVisible(child) && isVisible(parent);