be sure to not insert the same action two times
svn path=/trunk/KDE/kdelibs/; revision=1147196
This commit is contained in:
parent
93a955c984
commit
396972c468
@ -544,6 +544,10 @@ void DesktopToolBox::addTool(QAction *action)
|
||||
return;
|
||||
}
|
||||
|
||||
if (actions().contains(action)) {
|
||||
return;
|
||||
}
|
||||
|
||||
InternalToolBox::addTool(action);
|
||||
Plasma::IconWidget *tool = new Plasma::IconWidget(toolParent());
|
||||
|
||||
|
@ -116,6 +116,11 @@ QGraphicsWidget *InternalToolBox::toolParent()
|
||||
return this;
|
||||
}
|
||||
|
||||
QList<QAction *> InternalToolBox::actions() const
|
||||
{
|
||||
return d->actions;
|
||||
}
|
||||
|
||||
void InternalToolBox::addTool(QAction *action)
|
||||
{
|
||||
if (!action) {
|
||||
|
@ -95,6 +95,8 @@ public:
|
||||
virtual void showToolBox() = 0;
|
||||
virtual void hideToolBox() = 0;
|
||||
|
||||
QList<QAction *> actions() const;
|
||||
|
||||
protected:
|
||||
Containment *containment();
|
||||
QPoint toolPosition(int toolHeight);
|
||||
|
Loading…
Reference in New Issue
Block a user