diff --git a/extenders/extendergroup.cpp b/extenders/extendergroup.cpp index 9a4a8fb49..7395bbed1 100644 --- a/extenders/extendergroup.cpp +++ b/extenders/extendergroup.cpp @@ -98,6 +98,8 @@ ExtenderGroup::ExtenderGroup(Extender *parent, uint groupId) connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(themeChanged())); + + setGroup(this); } ExtenderGroup::~ExtenderGroup() diff --git a/extenders/extenderitem.cpp b/extenders/extenderitem.cpp index 0ef47b922..832910b3f 100644 --- a/extenders/extenderitem.cpp +++ b/extenders/extenderitem.cpp @@ -375,8 +375,13 @@ void ExtenderItem::setGroup(ExtenderGroup *group) void ExtenderItem::setGroup(ExtenderGroup *group, const QPointF &pos) { if (isGroup()) { - //nesting extender groups is just insane. I don't think we'd even want to support that. - kWarning() << "Nesting ExtenderGroups is not supported"; + if (group == this) { + //a group of a group is always just itself + d->group = group; + } else { + //nesting extender groups is just insane. I don't think we'd even want to support that. + kWarning() << "Nesting ExtenderGroups is not supported"; + } return; } @@ -406,7 +411,7 @@ ExtenderGroup *ExtenderItem::group() const bool ExtenderItem::isGroup() const { - return (config().readEntry("isGroup", false)); + return (config().readEntry("isGroup", false) && qobject_cast(this)); } bool ExtenderItem::isCollapsed() const