]> source.dussan.org Git - vaadin-framework.git/commitdiff
#8515 Avoid painting invisible children, also through old style paint
authorArtur Signell <artur@vaadin.com>
Tue, 20 Mar 2012 12:10:42 +0000 (14:10 +0200)
committerArtur Signell <artur@vaadin.com>
Wed, 21 Mar 2012 13:28:00 +0000 (15:28 +0200)
calls

src/com/vaadin/ui/AbstractComponent.java
src/com/vaadin/ui/DirtyConnectorTracker.java

index e440bc57c5767016175af41d6fd579763f63559c..4d12e0ed27564cf96adfc63b0854f5649a9e47f0 100644 (file)
@@ -737,6 +737,10 @@ public abstract class AbstractComponent implements Component, MethodEventSource
      *             if the paint operation failed.
      */
     public void paint(PaintTarget target) throws PaintException {
+        if (!isVisibleInContext()) {
+            return;
+        }
+
         final String tag = target.getTag(this);
         final PaintStatus status = target.startPaintable(this, tag);
         if (PaintStatus.DEFER == status) {
index 1225b5f84f1d9083f0c9200e54cc09979f63dd30..a3bdd8a3a90a3eb8593ece49a102c669876a0249 100644 (file)
@@ -100,7 +100,17 @@ public class DirtyConnectorTracker implements RepaintRequestListener {
         System.out.println("All components are now clean");
     }
 
+    /**
+     * Marks all visible components dirty, starting from the given component and
+     * going downwards in the hierarchy.
+     * 
+     * @param c
+     *            The component to start iterating downwards from
+     */
     private void markComponentsDirtyRecursively(Component c) {
+        if (!c.isVisible()) {
+            return;
+        }
         markDirty(c);
         if (c instanceof HasComponents) {
             HasComponents container = (HasComponents) c;