be more careful with items being added more than once
svn path=/trunk/KDE/kdelibs/; revision=986691
This commit is contained in:
parent
970766d468
commit
a2cd3cdeec
@ -411,7 +411,7 @@ 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()) {
|
||||
if (!item->group()) {
|
||||
if (appearance() == BottomUpStacked) {
|
||||
//at the top
|
||||
d->layout->insertItem(0, item);
|
||||
@ -540,6 +540,11 @@ ExtenderPrivate::~ExtenderPrivate()
|
||||
|
||||
void ExtenderPrivate::addExtenderItem(ExtenderItem *item, const QPointF &pos)
|
||||
{
|
||||
if (attachedExtenderItems.contains(item)) {
|
||||
q->itemAddedEvent(item, pos);
|
||||
return;
|
||||
}
|
||||
|
||||
attachedExtenderItems.append(item);
|
||||
q->itemHoverLeaveEvent(item);
|
||||
q->itemAddedEvent(item, pos);
|
||||
|
Loading…
Reference in New Issue
Block a user