prevent duplicate actions in the toolbox
BUG:200981 svn path=/trunk/KDE/kdelibs/; revision=1016829
This commit is contained in:
parent
6b5a36dbd3
commit
37f65858dc
@ -111,6 +111,14 @@ void ToolBox::addTool(QAction *action)
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (QGraphicsItem *child, QGraphicsItem::children()) {
|
||||
//kDebug() << "checking tool" << child << child->data(ToolName);
|
||||
Plasma::IconWidget *tool = dynamic_cast<Plasma::IconWidget*>(child);
|
||||
if (tool && tool->action() == action) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Plasma::IconWidget *tool = new Plasma::IconWidget(this);
|
||||
|
||||
tool->setTextBackgroundColor(QColor());
|
||||
|
Loading…
x
Reference in New Issue
Block a user