From 3958e203befa0a83de8b8dc8dfbd715cf5aa6ce7 Mon Sep 17 00:00:00 2001 From: Adenilson Cavalcanti Da Silva Date: Fri, 19 Mar 2010 19:47:52 +0000 Subject: [PATCH] Paint only if the item is visible. svn path=/trunk/KDE/kdelibs/; revision=1105303 --- animations/pulsershadow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/animations/pulsershadow.cpp b/animations/pulsershadow.cpp index f95ded6ee..13394afae 100644 --- a/animations/pulsershadow.cpp +++ b/animations/pulsershadow.cpp @@ -20,6 +20,7 @@ #include #include #include +#include static const int RECURSION_MAX = 20; namespace Plasma @@ -55,11 +56,14 @@ void ShadowFake::paintSubChildren(QPainter *painter, if (list.size() > 0) { for (int i = 0; i < list.size(); ++i) { tmp = list.value(i); + if ((tmp->childItems().size() > 0) && (stack < RECURSION_MAX)) { paintSubChildren(painter, option, tmp); } - tmp->paint(painter, option, 0); + if (tmp->isVisible()) { + tmp->paint(painter, option, 0); + } } } --stack;