From: Leif Åstrand Date: Tue, 29 May 2012 13:47:04 +0000 (+0300) Subject: Redefine isVisible to not paint dirty detached component (#6690) X-Git-Tag: 7.0.0.alpha3~212 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1e6e833666cdae5bff04a4c835baf117a8aba0b5;p=vaadin-framework.git Redefine isVisible to not paint dirty detached component (#6690) --- diff --git a/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java b/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java index 186126c9c6..15b148ce7f 100644 --- a/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java +++ b/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java @@ -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);