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 <QImage>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QStyleOptionGraphicsItem>
|
#include <QStyleOptionGraphicsItem>
|
||||||
|
#include <QDebug>
|
||||||
static const int RECURSION_MAX = 20;
|
static const int RECURSION_MAX = 20;
|
||||||
|
|
||||||
namespace Plasma
|
namespace Plasma
|
||||||
@ -55,11 +56,14 @@ void ShadowFake::paintSubChildren(QPainter *painter,
|
|||||||
if (list.size() > 0) {
|
if (list.size() > 0) {
|
||||||
for (int i = 0; i < list.size(); ++i) {
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
tmp = list.value(i);
|
tmp = list.value(i);
|
||||||
|
|
||||||
if ((tmp->childItems().size() > 0) && (stack < RECURSION_MAX)) {
|
if ((tmp->childItems().size() > 0) && (stack < RECURSION_MAX)) {
|
||||||
paintSubChildren(painter, option, tmp);
|
paintSubChildren(painter, option, tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp->paint(painter, option, 0);
|
if (tmp->isVisible()) {
|
||||||
|
tmp->paint(painter, option, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
--stack;
|
--stack;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user