resetConfigurationObject also deletes the group, so lets do that *after* we've reparented it shall we? =)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=789299
This commit is contained in:
Aaron J. Seigo 2008-03-23 21:36:33 +00:00
parent f70fe59495
commit 544e10ab13

View File

@ -624,13 +624,13 @@ void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit)
if (currentContainment && currentContainment != this) {
applet->removeSceneEventFilter(currentContainment);
KConfigGroup oldConfig = applet->config();
applet->resetConfigurationObject();
currentContainment->d->applets.removeAll(applet);
addChild(applet);
// now move the old config to the new location
KConfigGroup c = config().group("Applets").group(QString::number(applet->id()));
oldConfig.reparent(&c);
applet->resetConfigurationObject();
} else {
addChild(applet);
}