From 1e6e833666cdae5bff04a4c835baf117a8aba0b5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Tue, 29 May 2012 16:47:04 +0300 Subject: [PATCH] Redefine isVisible to not paint dirty detached component (#6690) --- .../gwt/server/AbstractCommunicationManager.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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); -- 2.39.5