don't produce errors if our content is empty

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=766098
This commit is contained in:
Aaron J. Seigo 2008-01-25 08:31:32 +00:00
parent 74a5773d79
commit 67aae7bf6e

View File

@ -232,9 +232,13 @@ public:
// the transparent border around the svg seems to vary in size depending on the size of the svg and as a result increasing the
// svn image by 2 all around didn't resolve the issue. For now it resizes based on the border size.
if (contentWidth > 0 && contentHeight > 0) {
background->resize(contentWidth, contentHeight);
background->paint(&p, QRect(contentLeft-leftWidth, contentTop-topHeight, contentWidth+leftWidth*2, contentHeight+topHeight*2), "center");
background->paint(&p, QRect(contentLeft-leftWidth, contentTop-topHeight,
contentWidth+leftWidth*2, contentHeight+topHeight*2),
"center");
background->resize();
}
background->paint(&p, QRect(leftOffset, topOffset, leftWidth, topHeight), "topleft");
background->paint(&p, QRect(rightOffset, topOffset,rightWidth, topHeight), "topright");