avoid painting empty pixmaps.
BUG:161122 svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=799536
This commit is contained in:
parent
77e66bc8fb
commit
92a2bb701e
13
svg.cpp
13
svg.cpp
@ -183,7 +183,13 @@ class Svg::Private
|
||||
} else {
|
||||
s = elementSize(elementId);
|
||||
}
|
||||
|
||||
//kDebug() << "size for " << elementId << " is " << s;
|
||||
|
||||
if (!s.isValid()) {
|
||||
p = QPixmap();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SVG_CACHE_BUGFIX
|
||||
@ -350,9 +356,12 @@ void Svg::paint(QPainter* painter, const QPointF& point, const QString& elementI
|
||||
{
|
||||
QPixmap pix;
|
||||
d->findInCache(pix, elementID, painter);
|
||||
#if SVG_CACHE_BUGFIX
|
||||
if (pix.isNull())
|
||||
|
||||
if (pix.isNull()) {
|
||||
return;
|
||||
}
|
||||
|
||||
#if SVG_CACHE_BUGFIX
|
||||
painter->save();
|
||||
QTransform x = painter->worldTransform();
|
||||
painter->setWorldTransform(QTransform(), false);
|
||||
|
Loading…
Reference in New Issue
Block a user