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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete d->cachedBackground;
|
|
||||||
d->cachedBackground = 0;
|
|
||||||
d->background->setFile(imagePath);
|
d->background->setFile(imagePath);
|
||||||
updateSizes();
|
updateSizes();
|
||||||
}
|
}
|
||||||
@ -98,8 +96,6 @@ void SvgPanel::setBorderFlags(const BorderFlags flags)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete d->cachedBackground;
|
|
||||||
d->cachedBackground = 0;
|
|
||||||
d->bFlags = flags;
|
d->bFlags = flags;
|
||||||
updateSizes();
|
updateSizes();
|
||||||
}
|
}
|
||||||
@ -115,8 +111,6 @@ void SvgPanel::resize(const QSizeF& size)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete d->cachedBackground;
|
|
||||||
d->cachedBackground = 0;
|
|
||||||
d->panelSize = size;
|
d->panelSize = size;
|
||||||
updateSizes();
|
updateSizes();
|
||||||
}
|
}
|
||||||
@ -314,6 +308,8 @@ void SvgPanel::paint(QPainter* painter, const QRectF& rect)
|
|||||||
|
|
||||||
void SvgPanel::updateSizes()
|
void SvgPanel::updateSizes()
|
||||||
{
|
{
|
||||||
|
delete d->cachedBackground;
|
||||||
|
d->cachedBackground = 0;
|
||||||
d->background->resize();
|
d->background->resize();
|
||||||
if (d->bFlags & DrawTopBorder) {
|
if (d->bFlags & DrawTopBorder) {
|
||||||
d->topHeight = d->background->elementSize("top").height();
|
d->topHeight = d->background->elementSize("top").height();
|
||||||
|
Loading…
Reference in New Issue
Block a user