when the background hints change, ensure we schedule an update; fixes the background of the folderview not being painted on first plasma start

svn path=/trunk/KDE/kdelibs/; revision=982099
This commit is contained in:
Aaron J. Seigo 2009-06-14 22:12:40 +00:00
parent 0e32cf6cf6
commit 198c7cd970

View File

@ -822,6 +822,10 @@ Applet::BackgroundHints Applet::backgroundHints() const
void Applet::setBackgroundHints(const BackgroundHints hints) void Applet::setBackgroundHints(const BackgroundHints hints)
{ {
if (d->backgroundHints == hints) {
return;
}
d->backgroundHints = hints; d->backgroundHints = hints;
//Draw the standard background? //Draw the standard background?
@ -870,6 +874,8 @@ void Applet::setBackgroundHints(const BackgroundHints hints)
d->background = 0; d->background = 0;
setContentsMargins(0, 0, 0, 0); setContentsMargins(0, 0, 0, 0);
} }
update();
} }
bool Applet::hasFailedToLaunch() const bool Applet::hasFailedToLaunch() const
@ -2147,7 +2153,7 @@ bool Applet::isContainment() const
AppletPrivate::AppletPrivate(KService::Ptr service, int uniqueID, Applet *applet) AppletPrivate::AppletPrivate(KService::Ptr service, int uniqueID, Applet *applet)
: appletId(uniqueID), : appletId(uniqueID),
q(applet), q(applet),
backgroundHints(Applet::StandardBackground), backgroundHints(Applet::NoBackground),
aspectRatioMode(Plasma::KeepAspectRatio), aspectRatioMode(Plasma::KeepAspectRatio),
immutability(Mutable), immutability(Mutable),
appletDescription(service), appletDescription(service),