Paint only if the item is visible.

svn path=/trunk/KDE/kdelibs/; revision=1105303
This commit is contained in:
Adenilson Cavalcanti Da Silva 2010-03-19 19:47:52 +00:00
parent 76d131a501
commit 3958e203be

View File

@ -20,6 +20,7 @@
#include <QImage>
#include <QPixmap>
#include <QStyleOptionGraphicsItem>
#include <QDebug>
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;