From cd884edd21ac4ad2868fe98ec9820fb855698eb3 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 29 Dec 2009 21:30:12 +0000 Subject: [PATCH] revert old bogus stuff that got in in the last commit, sorry :) svn path=/trunk/KDE/kdelibs/; revision=1067567 --- extenders/extender.cpp | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/extenders/extender.cpp b/extenders/extender.cpp index 08acb1574..f2937f96f 100644 --- a/extenders/extender.cpp +++ b/extenders/extender.cpp @@ -37,7 +37,6 @@ #include "svg.h" #include "theme.h" #include "widgets/label.h" -#include "widgets/scrollwidget.h" #include "private/applet_p.h" #include "private/applethandle_p.h" @@ -418,32 +417,16 @@ void Extender::itemAddedEvent(ExtenderItem *item, const QPointF &pos) if (pos == QPointF(-1, -1)) { //if just plain adding an item, add it at a sane position: if (!item->group()) { - ScrollWidget *scroll; - if (item->isGroup()) { - scroll = new Plasma::ScrollWidget(this); - QGraphicsWidget *mainWidget = new QGraphicsWidget(scroll); - QGraphicsLinearLayout *lay = new QGraphicsLinearLayout(mainWidget); - } if (appearance() == BottomUpStacked) { //at the top - if (item->isGroup()) { - d->layout->insertItem(0, scroll); - } d->layout->insertItem(0, item); } else { //at the bottom d->layout->addItem(item); - if (item->isGroup()) { - d->layout->addItem(scroll); - } } } else { //at the top in the group it belongs to -//d->layout->insertItem(d->insertIndexFromPos(item->group()->pos()) + 1, item); - Plasma::ScrollWidget *scroll = dynamic_cast(d->layout->itemAt(d->insertIndexFromPos(item->group()->pos()) + 1)); - if (scroll) { - static_cast(scroll->widget()->layout())->insertItem(0, item); - } + d->layout->insertItem(d->insertIndexFromPos(item->group()->pos()) + 1, item); } } else { d->layout->insertItem(d->insertIndexFromPos(pos), item); @@ -456,13 +439,6 @@ void Extender::itemAddedEvent(ExtenderItem *item, const QPointF &pos) void Extender::itemRemovedEvent(ExtenderItem *item) { - if (item->isGroup()) { - QGraphicsLayoutItem *layoutItem = d->layout->itemAt(d->insertIndexFromPos(item->pos()) + 1); - if (dynamic_cast(layoutItem)) { - d->layout->removeItem(layoutItem); - delete item; - } - } d->layout->removeItem(item); if (d->spacerWidget) {