avoid calling getMargins twice when not necessary

svn path=/trunk/KDE/kdelibs/; revision=979113
This commit is contained in:
Aaron J. Seigo 2009-06-08 23:33:10 +00:00
parent 921f3a436b
commit 8a4dc5460d

View File

@ -105,13 +105,14 @@ void DialogPrivate::themeChanged()
qreal rightWidth;
qreal bottomHeight;
background->getMargins(leftWidth, topHeight, rightWidth, bottomHeight);
//kDebug() << leftWidth << topHeight << rightWidth << bottomHeight;
FrameSvg::EnabledBorders borders = FrameSvg::AllBorders;
Extender *extender = qobject_cast<Extender*>(graphicsWidget);
if (extender) {
background->getMargins(leftWidth, topHeight, rightWidth, bottomHeight);
switch (extender->d->applet->location()) {
case BottomEdge:
borders ^= FrameSvg::BottomBorder;