delete the cached image in updateSizes, helps for when the Svg emits repaintNeeded; all calls to updateSizes were prefixed with deleting the cached image anyways
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=771872
This commit is contained in:
parent
72b7c6f393
commit
76132227a5
@ -81,8 +81,6 @@ void SvgPanel::setFile(const QString& imagePath)
|
||||
return;
|
||||
}
|
||||
|
||||
delete d->cachedBackground;
|
||||
d->cachedBackground = 0;
|
||||
d->background->setFile(imagePath);
|
||||
updateSizes();
|
||||
}
|
||||
@ -98,8 +96,6 @@ void SvgPanel::setBorderFlags(const BorderFlags flags)
|
||||
return;
|
||||
}
|
||||
|
||||
delete d->cachedBackground;
|
||||
d->cachedBackground = 0;
|
||||
d->bFlags = flags;
|
||||
updateSizes();
|
||||
}
|
||||
@ -115,8 +111,6 @@ void SvgPanel::resize(const QSizeF& size)
|
||||
return;
|
||||
}
|
||||
|
||||
delete d->cachedBackground;
|
||||
d->cachedBackground = 0;
|
||||
d->panelSize = size;
|
||||
updateSizes();
|
||||
}
|
||||
@ -314,6 +308,8 @@ void SvgPanel::paint(QPainter* painter, const QRectF& rect)
|
||||
|
||||
void SvgPanel::updateSizes()
|
||||
{
|
||||
delete d->cachedBackground;
|
||||
d->cachedBackground = 0;
|
||||
d->background->resize();
|
||||
if (d->bFlags & DrawTopBorder) {
|
||||
d->topHeight = d->background->elementSize("top").height();
|
||||
|
Loading…
Reference in New Issue
Block a user