Paint only if the item is visible.
svn path=/trunk/KDE/kdelibs/; revision=1105303
This commit is contained in:
parent
76d131a501
commit
3958e203be
@ -20,6 +20,7 @@
|
||||
#include <QImage>
|
||||
#include <QPixmap>
|
||||
#include <QStyleOptionGraphicsItem>
|
||||
#include <QDebug>
|
||||
static const int RECURSION_MAX = 20;
|
||||
|
||||
namespace Plasma
|
||||
@ -55,13 +56,16 @@ 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);
|
||||
}
|
||||
|
||||
if (tmp->isVisible()) {
|
||||
tmp->paint(painter, option, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
--stack;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user