diff --git a/private/toolbox.cpp b/private/toolbox.cpp index dd7d0b283..1a01e2f97 100644 --- a/private/toolbox.cpp +++ b/private/toolbox.cpp @@ -401,13 +401,19 @@ void ToolBox::save(KConfigGroup &cg) const group.writeEntry("offset", offset); } -void ToolBox::load() +void ToolBox::load(const KConfigGroup &containmentGroup) { if (!d->movable) { return; } - KConfigGroup group = d->containment->config(); + KConfigGroup group; + if (containmentGroup.isValid()) { + group = containmentGroup; + } else { + group = d->containment->config(); + } + group = KConfigGroup(&group, "ToolBox"); if (!group.hasKey("corner")) { diff --git a/private/toolbox_p.h b/private/toolbox_p.h index d437ed5cd..7ae36d184 100644 --- a/private/toolbox_p.h +++ b/private/toolbox_p.h @@ -87,7 +87,7 @@ public: void setViewTransform(QTransform transforn); void save(KConfigGroup &cg) const; - void load(); + void load(const KConfigGroup &containmentGroup = KConfigGroup()); void reposition(); virtual void showToolBox() = 0;