From 0069c3893476ce5322eb3397aa425a496fa0e442 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 6 Jan 2011 14:55:41 +0000 Subject: [PATCH] don't add empty extender groups that are autohide BUG:258645 svn path=/trunk/KDE/kdelibs/; revision=1212326 --- extenders/extender.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extenders/extender.cpp b/extenders/extender.cpp index 670099461..4e413502c 100644 --- a/extenders/extender.cpp +++ b/extenders/extender.cpp @@ -489,6 +489,11 @@ void Extender::dropEvent(QGraphicsSceneDragDropEvent *event) void Extender::itemAddedEvent(ExtenderItem *item, const QPointF &pos) { + ExtenderGroup *group = item->isGroup()?static_cast(item):0; + if (group && group->autoHide() && group->items().isEmpty()) { + return; + } + if (!item->group()) { if (pos == QPointF(-1, -1)) { //if it was already there, reposition